Skip to content
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

Create pkgsWithGhc package set #118

Closed
wants to merge 2 commits into from

Conversation

jonathanlking
Copy link
Collaborator

This moves the GHC configuration/fixing/selection to the start, ensuring that pkgsWithArchiveFiles contains the "final" version of ghc.
This is important as some users of the survey 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:

nix-repl> pkgs = import ./survey/default.nix { compiler = "ghc962"; }
nix-repl> pkgs.haskellPackages.ghc                                    
«derivation /nix/store/11rnlr5qbk1pxwk4zjyb3xyz8wz2fyx6-ghc-musl-9.6.2.drv»

@jonathanlking
Copy link
Collaborator Author

As always, I welcome feedback on

  • Whether pkgsWithGhc should be exposed/exist at all (should this be merged into the archiveFilesOverlay?)
  • Better names

@nh2
Copy link
Owner

nh2 commented Nov 9, 2023

I guess the main question I have is:

  • 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)? 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.

@jonathanlking
Copy link
Collaborator Author

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.

@jonathanlking
Copy link
Collaborator Author

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»

@nh2 nh2 mentioned this pull request Jun 15, 2024
@nh2 nh2 closed this in #127 Jun 15, 2024
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