Skip to content

Use haskell.nix in for hadrian #2040

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 1, 2023
Merged

Conversation

hamishmack
Copy link
Collaborator

Using musl64 version of nix-tools goes some way to avoid recompiles of GHC when updating haskell.nix. However any changes that impact the way hadrian will be built (for instance changes to builder/comp-builder.nix) will cause hadrian to need to be rebuilt. This intern causes GHC >=9.4 to need rebuilding.

To make this less likely this change adds a pinned-haskell-nix using the nix-tools subflake. Then hadrian is built using this.

Also when the static version of nix-tools cannot be used (macOS), a pinned version is used instead.

The nixpkgs used is also pinned, making it easier for people to use other versions of nixpkgs.

The hackage.nix is passed in to the nix-tools subflake to avoid downloading two copies when setting up a new machine (stackage.nix is not used).

Using musl64 version of nix-tools goes some way to avoid recompiles of GHC when updating haskell.nix.  However any changes that impact the way `hadrian` will be built (for instance changes to `builder/comp-builder.nix`) will cause `hadrian` to need to be rebuilt.  This intern causes GHC >=9.4 to need rebuilding.

To make this less likely this change adds a `pinned-haskell-nix` using the `nix-tools` subflake.  Then hadrian is built using this.

Also when the static version of `nix-tools` cannot be used (macOS), a pinned version is used instead.

The `nixpkgs` used is also pinned, making it easier for people to use other versions of nixpkgs.

The `hackage.nix` is passed in to the `nix-tools` subflake to avoid downloading two copies when setting up a new machine (stackage.nix is not used).
@hamishmack hamishmack merged commit 92b2799 into master Sep 1, 2023
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