Skip to content

Conversation

@cdepillabout
Copy link
Owner

@cdepillabout cdepillabout commented Mar 27, 2025

This PR adds a new argument to stacklock2nix: all-cabal-nixes.

This argument takes a derivation providing the all-cabal-nixes repo. This repo is the result of running cabal2nix on all the .cabal files in all-cabal-hashes.

stacklock2nix internally calls callHackage on all the dependencies coming from Hackage (for instance deps from both the Stackage resolver as well as extra-deps). Using all-cabal-nixescan eliminate the need forcallHackage` and (some?) IFD.

See the CHANGELOG and new documentation in this PR for more info.

This is related to #41.

This also uses @lf-'s some-cabal-hashes idea from https://jade.fyi/blog/nix-evaluation-blocking/ to collect all the cabal2nix output for the given Stackage resolver and extra-deps into a separate derivation. This enables initial builds with a shared Nix cache to be a little quicker, since only this new some-cabal-nixes needs to be downloaded from the cache (instead of the full all-cabal-nixes or all-cabal-hashes).

@cdepillabout cdepillabout marked this pull request as ready for review March 28, 2025 08:37
@cdepillabout cdepillabout merged commit 108f6ab into main Mar 28, 2025
2 checks passed
@cdepillabout cdepillabout deleted the faster-ifd branch March 28, 2025 08:37
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