Announcing stacklock2nix: easily build a Haskell project that contains a `stack.yaml.lock` file

No, but I do have an issue open about implementing it:


In practice this isn’t a problem.

stacklock2nix generates a set of overrides for the packages in stack.yaml.lock. These overrides are all calls to callHackage (or callCabal2nix), so a “new” package is generated for each attribute. stacklock2nix never “reuses” packages from the Haskell package set in Nixpkgs.

So the versions of the Haskell packages you get from stacklock2nix will be the exact versions specified in your stack.yaml.lock file.

(The downside of this is that Nixpkgs may contain a helpful override that is necessary to get some arbitrary Haskell package building with Nix. I’ve moved quite a few of these overrides to stacklock2nix in stacklock2nix/suggestedOverlay.nix at ebe40119dea257906044ecb1543c44ca57748764 · cdepillabout/stacklock2nix · GitHub, which is exposed here, but I haven’t moved over everything.)

I added a FAQ entry for this:

I posted about stacklock2nix on the Haskell Discourse as well:

It is possible there may be interesting/relevant comments there.

I implemented this feature in the latest release:

1 Like
Hosted by Flying Circus.