Closed jonathanlking closed 1 month ago
As always, I welcome feedback on
pkgsWithGhc
should be exposed/exist at all (should this be merged into the archiveFilesOverlay
?)I guess the main question I have is:
pkgsWithArchiveFiles
, and then the static-enabled GHC overlay (as in, swap the order from your PR)? That way people who aren't interested in Haskell, but "system" (C) packages with static and shared libs, could use only the lowest level, and that'd be the the easiest candidate for nixpkgs upstreaming.Wouldn't it make more sense to layer first the pkgsWithArchiveFiles, and then the static-enabled GHC overlay (as in, swap the order from your PR)?
Yes, I agree; Would anyone want a patched version of GHC without the archive files? I don't think so. Therefore it makes sense for the GHC patch to come after.
I've run the sanity check again, and still get:
nix-repl> pkgs = import ./survey/default.nix { compiler = "ghc962"; }
nix-repl> pkgs.haskellPackages.ghc
«derivation /nix/store/11rnlr5qbk1pxwk4zjyb3xyz8wz2fyx6-ghc-musl-9.6.2.drv»
but now get (as expected):
nix-repl> pkgs.pkgsWithArchiveFiles.ghc
«derivation /nix/store/pd3h7k2f9p9290dhfch2wnwkp9714xgk-ghc-musl-9.2.7.drv»
This moves the GHC configuration/fixing/selection to the start, ensuring that
pkgsWithArchiveFiles
contains the "final" version ofghc
. This is important as some users of thesurvey
are only interested in a copy of GHC and static libraries (e.g. https://github.com/tweag/skyscope/pull/94/files#diff-8cce62c1be86c722f621f909a18b4a5df8eef70b6399b40194894ad9ce09f0abR20), so can depend on just a subset of the patches made.As a sanity check, we get the same derivation before and after this change for: