v5.0.0
From this releease, stacklock2nix will only be usable with Nixpkgs >= 24.05!
Big changes:
-
Fixes the construction of
newPkgSet. See
here
for more information.One big implication of this change is that Nixpkgs before the referenced
commit will not be able to be used with stacklock2nix anymore. So this
version of stacklock2nix will only work with Nixpkgs after that commit (so
around>= nixos-24.05)!Fixed in #62.
Thanks to @Mr-Andersen! -
Correctly passes
all-cabal-hashestonewPkgSet.
Fixed in #62.
Thanks to @Mr-Andersen for reporting this.
A few other small changes:
-
Expose some additional
passthruvalues on Haskell derivations generated
by stacklock2nix.All Haskell derivations generated with
stacklock2nixnow have a
passthru.stacklock2nixkey, which is an attrset filled with the
following keys. All keys have aBoolvalue:is-local-pkg: Is this a local package defined instack.yaml?is-extra-dep: Is this anextra-depdefined instack.yaml?is-hackage-dep: Is this a dep from Hackage?is-git-dep: Is this a dep from Git?is-url-dep: Is this a dep from a URL?
This can be used in your own overlays. For instance, if you want to
apply an overlay to the Haskell package set produced by stacklock2nix
that disables tests ONLY for local Haskell packages, you could write
the overlay like the following:hfinal: hprev: lib.mapAttrs ( name: drv: if lib.attrByPath [ "passthru" "stacklock2nix" "is-local-pkg" ] false drv then haskell.lib.compose.dontCheck drv else drv ) hprev
Added in #63
See the tests in that PR for some more examples of how you might want to
use this. -
Expose some additional
passthruvalues on the Haskell dev shell generated
by stacklock2nix.The dev shells generated with
stacklock2nixnow have a
passthru.stacklock2nixkey, which is an attrset filled with the
following keys and values:dev-shell-pkg-set: The Haskell package set used to generate this dev shell.
This is mainly useful in conjunction with thedevShellPkgSetModifier, in order
to inspect the final package set produced after applyingdevShellPkgSetModifier.shell-for-args: The passed toshellForin order to produce the dev shell.
This is an attrset.
Added in #63
-
Mark some additional packages as
dontCheckinsuggestedOverlay:- cborg
- lifted-base
- serialise
- servant-cassava
Implemented in #62
-
Pass
nullas thepgp-wordlistargument toprettyprinter.
pgp-wordlistis a test dep, but it is not in stackage.Implemented in #62
(Tests for
prettyprinterwere disabled insuggestedOverlayin
#59)