Fix haskell.nix
evaluation with recent nixpkgs
#1859
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
In our
haskell.nix
flake-based project, we're always careful to use thehaskell.nix
-providednixpkgs-unstable
pin to build our Haskell packages, because we want to take advantage of the IOG binary cache.However, in the same flake, we also want to run some NixOS tests which use our Haskell packages. In recent months,
nixpkgs
has made this relatively easy to do (see https://nixos.org/manual/nixos/unstable/index.html#sec-call-nixos-test-outside-nixos). Until recently, we were able to make this work withhaskell.nix
'snixpkgs-unstable
pin with an ugly hack, but unfortunately, as of the most recentnixpkgs-unstable
pin (747927516efcb5e31ba03b7ff32f61f6d47e7d87
), our hack no longer works, for a few reasons:overlays/bootstrap.nix
(and elsewhere),final.buildPlaform
and friends no longer exist.pkgsBuildBuild.system
no longer exists.pkgconfig
alias has been removed (now onlypkg-config
exists).I'm not suggesting that this PR is merged, as I confess that I don't really understand how
haskell.nix
works at this level of detail, and I was just blindly replacing various attributes with their obvious replacements, so it's possible that I've broken something else. But these changes do allow us now to usenixos-lib.runTest
, and don't seem to adversely affect our ability to build our Haskell packages.(I confess I'm a bit confused as to how
haskell.nix
builds at all with thenixpkgs-unstable
pin. I suppose you all are careful not to use that pin to evaluate the project in your CI system?)