Skip to content

Source the PureScript toolchain from purescript-overlay (keep legacy spago) #54

@Unisay

Description

@Unisay

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-bin namespace includes legacy 0.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 purs is already purs-0_15_16, identical to the current easy-ps.purs-0_15_16-0 pin. 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-0 and spago), 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-overlay as a flake input with inputs.nixpkgs.follows = "nixpkgs", and add purescript-overlay.overlays.default to the overlays list that builds pkgs, so it shares the haskell.nix nixpkgs.
  • In the dev-shell buildInputs, replace easy-ps.purs-0_15_16-0 with the overlay's purs (or purs-bin.purs-0_15_16 to pin the exact version).
  • Replace easy-ps.spago with spago-bin.spago-0_21_0 (explicit legacy pin, not the plain spago).
  • Remove the easy-purescript-nix input and the easy-ps = … binding once nothing references them.
  • Verify in nix develop: purs --version is 0.15.16 and spago --version is 0.21.x, then confirm cabal test all stays 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

Metadata

Metadata

Assignees

Labels

area: toolchainnix / spago / purs / buildchoreMaintenance / infrastructure

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions