Skip to content

chore: source the PureScript toolchain from purescript-overlay (#54)#113

Merged
Unisay merged 1 commit into
mainfrom
issue-54/purescript-overlay
Jun 23, 2026
Merged

chore: source the PureScript toolchain from purescript-overlay (#54)#113
Unisay merged 1 commit into
mainfrom
issue-54/purescript-overlay

Conversation

@Unisay

@Unisay Unisay commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

What

Swap the dev-shell toolchain provider from easy-purescript-nix (lightly maintained, only packages legacy spago 0.21.0) to purescript-overlaywithout changing the build: same purs 0.15.16, same legacy spago 0.21.0, same Dhall-based test/ps project.

This is the verified-safe prerequisite that unblocks #55 (migrate to the new spago), which becomes a one-attribute pin swap once the overlay is in place.

Changes

  • flake.nix: add purescript-overlay as an input (its nixpkgs follows ours) plus purescript-overlay.overlays.default; remove easy-purescript-nix entirely. Pin the toolchain explicitly as purs-bin.purs-0_15_16 / spago-bin.spago-0_21_0.
  • flake.lock: regenerated — easy-purescript-nix dropped, purescript-overlay added (its nixpkgs deduped via follows).
  • CLAUDE.md: refresh the Toolchain and Updating-Dependencies prose.

Why explicit *-bin.* pins (not plain purs / spago)

The overlay's stable spago now resolves to the new PureScript spago 1.0.4, so plain spago would not be the legacy 0.21 we want — the spago-bin.spago-0_21_0 pin is mandatory. For consistency purs is pinned the same way (purs-bin.purs-0_15_16): the top-level purs/spago "stable" aliases are mutable across overlay versions, so an explicit pin stops a future nix flake update from silently bumping the compiler and churning goldens. Matches the repo's stated philosophy ("pinned by the flake; update them there, not locally").

Verification

  • nix develop: purs --version0.15.16, spago --version0.21.0.
  • cd test/ps && spago build -u '-g corefn' → CoreFn regenerates byte-identically (no corefn.json diff), confirming the overlay's purs build matches easy-ps's.
  • cabal test all314 examples, 0 failures; no golden churn.
  • git diff touches only flake.nix, flake.lock, CLAUDE.md.

Out of scope (→ #55)

No spago.yaml, registry, package-set, or build-command changes; no new tools (purs-tidy/purs-backend-es) added to the shell.

Closes #54

Swap the dev-shell toolchain provider from easy-purescript-nix (lightly
maintained, legacy-spago-only) to purescript-overlay, without changing the
build: same purs 0.15.16, same legacy spago 0.21.0, same Dhall-based test
project.

- flake.nix: add purescript-overlay input (nixpkgs follows ours) + its
  overlays.default; remove easy-purescript-nix entirely. Pin the toolchain
  explicitly as purs-bin.purs-0_15_16 / spago-bin.spago-0_21_0 (the overlay's
  plain `spago` now resolves to the new 1.x; explicit pins also stop
  `nix flake update` from silently bumping purs and churning goldens).
- flake.lock: regenerated (easy-purescript-nix dropped, purescript-overlay
  added, its nixpkgs deduped via follows).
- CLAUDE.md: refresh the toolchain + dependency-update prose.

Verified: `purs --version` 0.15.16, `spago --version` 0.21.0; CoreFn
regenerates byte-identically (no golden churn); full suite 314/0.

Prerequisite for #55 (migrate to the new spago), which becomes a one-attribute
pin swap once the overlay is in place.

Closes #54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR switches the Nix dev-shell PureScript toolchain source from easy-purescript-nix to purescript-overlay while keeping the effective toolchain versions and build behavior unchanged (still purs 0.15.16 + legacy spago 0.21.0 for the Dhall-based test/ps project). This lays the groundwork for the follow-up migration to the new Spago.

Changes:

  • Replace easy-purescript-nix with purescript-overlay in flake.nix, and explicitly pin purs-bin.purs-0_15_16 and spago-bin.spago-0_21_0.
  • Regenerate flake.lock to drop easy-purescript-nix and add purescript-overlay (with nixpkgs deduped via follows).
  • Update CLAUDE.md documentation to reflect the new toolchain source and explicit *-bin pins.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
flake.nix Swaps dev-shell toolchain provider to purescript-overlay and pins legacy tool versions via purs-bin.* / spago-bin.*.
flake.lock Updates lockfile inputs to remove easy-purescript-nix and add purescript-overlay (+ its transitive inputs).
CLAUDE.md Updates toolchain and dependency-update guidance to match the overlay-based, explicitly pinned setup.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Unisay Unisay merged commit 8621e37 into main Jun 23, 2026
3 checks passed
@Unisay Unisay deleted the issue-54/purescript-overlay branch June 23, 2026 13:16
@Unisay Unisay self-assigned this Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants