Repository navigation
Description
Motivation
The dev shell currently pulls purs and spago from easy-purescript-nix, which is lightly maintained and only packages legacy spago 0.21.0. The modern, auto-updated source for PureScript tooling in Nix is purescript-overlay: it pins purs, spago, purs-tidy, purs-backend-es, and the language server, and exposes every released version under a -bin namespace.
This issue swaps the toolchain provider without changing the build: same purs, same legacy spago, same Dhall-based test project. It is deliberately decoupled from the larger move to the new spago / spago.yaml, which becomes a one-attribute swap once the overlay is in place.
Why this is safe (verified)
- The overlay's
spago-binnamespace includes legacy0.21.0(and 0.18 through 0.20), so we can keep the exact legacy spago we use now, sourced from the overlay. easy-purescript-nix is no longer needed for it. - The overlay's stable
pursis alreadypurs-0_15_16, identical to the currenteasy-ps.purs-0_15_16-0pin. No compiler bump, so the goldens do not change. - In
flake.nix, easy-purescript-nix is used for only two things (purs-0_15_16-0andspago), so the input can be removed entirely.
Caveat
The overlay's plain spago (stable) attribute now resolves to the new PureScript spago (1.0.x). To keep legacy behaviour, pin spago-bin.spago-0_21_0 explicitly instead of using spago.
Plan
- Add
purescript-overlayas a flake input withinputs.nixpkgs.follows = "nixpkgs", and addpurescript-overlay.overlays.defaultto theoverlayslist that buildspkgs, so it shares the haskell.nix nixpkgs. - In the dev-shell
buildInputs, replaceeasy-ps.purs-0_15_16-0with the overlay'spurs(orpurs-bin.purs-0_15_16to pin the exact version). - Replace
easy-ps.spagowithspago-bin.spago-0_21_0(explicit legacy pin, not the plainspago). - Remove the
easy-purescript-nixinput and theeasy-ps = …binding once nothing references them. - Verify in
nix develop:purs --versionis 0.15.16 andspago --versionis 0.21.x, then confirmcabal test allstays green with unchanged goldens.
Out of scope
No spago.yaml, registry, package-set, or build-command changes. Those belong to the separate "migrate to new spago" issue, which depends on this one and will simply swap spago-bin.spago-0_21_0 for the new stable spago.
References
- purescript-overlay
- Follow-up: Migrate toolchain to the new Spago (spago.yaml + registry), including the Lua package-set forks #55 (migrate toolchain to the new spago), which this issue unblocks
Activity