Skip to content

rename package to spago-legacy to help NixPkgs#3

Merged
f-f merged 4 commits intopurescript:masterfrom
peterbecich:rename-package
Jul 28, 2024
Merged

rename package to spago-legacy to help NixPkgs#3
f-f merged 4 commits intopurescript:masterfrom
peterbecich:rename-package

Conversation

@peterbecich
Copy link
Contributor

@peterbecich peterbecich commented Jul 6, 2024

Description of the change

This package is currently spago in NixPkgs:
https://search.nixos.org/packages?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=spago

The Nix configuration for that is generated from this Cabal file. Renaming to spago-legacy will help clear the path for NixPkgs update to the new Spago.

I think it's unnecessary for the spago binary to be renamed to spago-legacy.

If this PR is merged, NixPkgs will be updated to the latest commit in this repo spago-legacy.

cabal build --enable-tests

succeeds with GHC 9.2

stack build succeeds.

Please merge this PR and make a fix version/release 0.21.1 or maybe even 0.21.0.1. This is probably necessary for Nix to grab the latest commit, I don't think it works directly off the branch.

Checklist:

  • Added the change to the "Unreleased" section of the changelog
  • Added some example of the new feature to the README
  • Added a test for the contribution (if applicable)

P.S.: the above checks are not compulsory to get a change merged, so you may skip them. However, taking care of them will result in less work for the maintainers and will be much appreciated 😊

This package is currently `spago` in NixPkgs:
https://search.nixos.org/packages?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=spago

The Nix configuration for that is generated from this Cabal file.
Renaming to `spago-legacy` will help NixPkgs update to the new Spago.

I think it's unnecessary for the `spago` binary to be renamed.
@f-f
Copy link
Member

f-f commented Jul 6, 2024

We don't have release CI set up on this repo, so it might take more work to build the binaries. Will nixpkgs need the binaries or will it build them off the branch? In other words: will just cutting the release tag enough for nixpkgs?

@peterbecich
Copy link
Contributor Author

NixPkgs will not need the binaries.

From what I can understand about this script
https://github.com/NixOS/nixpkgs/blob/9860009d87706af95eb94bc5369f86741e047135/pkgs/development/tools/purescript/spago-legacy/update.sh#L22-L31
the release bundle is necessary but you can omit the binaries. In fact, the release bundle can probably be empty. A tag without a release is insufficient. The script is going to grab the latest item in https://api.github.com/repos/purescript/spago-legacy/releases, parse the tag from that, and then cabal2nix will fetch that tag.

Thanks

@f-f
Copy link
Member

f-f commented Jul 7, 2024

Thanks, that makes sense. I can merge this PR and cut a new tag, but we'll need to get CI going first - the macOS build fails with the purescript installer failing Check if a prebuilt 0.15.8 binary is provided for darwin-arm64. Which is strange because the build is not running on an ARM machine.

@peterbecich
Copy link
Contributor Author

peterbecich commented Jul 13, 2024

I can disable the unnecessary jobs in .github in this PR, leaving only build ubuntu-latest and Cabal build, is that acceptable?

@peterbecich
Copy link
Contributor Author

peterbecich commented Jul 13, 2024

I don't think the Mac build is necessary to support the Darwin platform of the Nix build:

https://search.nixos.org/packages?channel=unstable&show=spago&from=0&size=50&sort=relevance&type=packages&query=spago
Platforms

[aarch64-darwin](https://hydra.nixos.org/job/nixos/trunk-combined/nixpkgs.spago.aarch64-darwin)
[aarch64-linux](https://hydra.nixos.org/job/nixos/trunk-combined/nixpkgs.spago.aarch64-linux)
[i686-linux](https://hydra.nixos.org/job/nixos/trunk-combined/nixpkgs.spago.i686-linux)
[x86_64-darwin](https://hydra.nixos.org/job/nixos/trunk-combined/nixpkgs.spago.x86_64-darwin)
[x86_64-linux](https://hydra.nixos.org/job/nixos/trunk-combined/nixpkgs.spago.x86_64-linux)

It is going to build Spago directly from source, given the release package.

- name: Setup Haskell (macOS and Windows)
if: runner.os != 'Linux'
uses: haskell/actions/setup@v1
uses: haskell-actions/setup@v2
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@peterbecich
Copy link
Contributor Author

@f-f please review again

@peterbecich peterbecich requested a review from f-f July 16, 2024 05:34
@peterbecich
Copy link
Contributor Author

@f-f please review again

@f-f f-f merged commit 2790261 into purescript:master Jul 28, 2024
@f-f
Copy link
Member

f-f commented Jul 28, 2024

I merged and cut the new release. Please keep me posted on the progress in nixpkgs!

I think it's unnecessary for the spago binary to be renamed to spago-legacy.

Let's do the renaming, it's quite confusing to have the two things share the same binary name.

@peterbecich
Copy link
Contributor Author

Thanks @f-f , here is the WIP NixOS/nixpkgs#324944

I will rename the binary to spago-legacy. This may require another PR and release, t.b.d.

sternenseemann added a commit to peterbecich/nixpkgs that referenced this pull request Sep 28, 2025
sternenseemann added a commit to NixOS/nixpkgs that referenced this pull request Sep 28, 2025
sternenseemann added a commit to sternenseemann/nixpkgs that referenced this pull request Oct 2, 2025
See purescript/spago-legacy#3.

Co-authored-by: Peter Becich <[email protected]>
(cherry picked from commit 4015665)
sternenseemann added a commit to sternenseemann/nixpkgs that referenced this pull request Oct 2, 2025
See purescript/spago-legacy#3.

Co-authored-by: Peter Becich <[email protected]>
(cherry picked from commit 4015665)
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.

2 participants