Releases: cdepillabout/stacklock2nix
Release list
v5.2.3
This release fixes a build failure when using all-cabal-nixes:
- Fix build failure when using
all-cabal-nixesand the last package in the list is a duplicate. The derivation would fail with exit code 1 due to a shell scripting issue. #70 Thanks @Mr-Andersen!
v5.2.2
This release fixes compatibility with newer versions of some Haskell packages:
v5.2.1
This release just adds some overrides for additional Haskell packages.
v5.2.0
This release adds an all-cabal-nixes argument to stacklock2nix. This can give an improvement on initial build time when using stacklock2nix with a shared cache.
The all-cabal-nixes argument can be used like the following:
stacklock2nix {
stackYaml = ./stack.yaml;
all-cabal-nixes = fetchFromGitHub {
owner = "all-cabal-nixes";
repo = "all-cabal-nixes";
rev = "c37e66df270014a18ed11527db55928a4a2ae5d4";
sha256 = "sha256-QcAhW8yFGwj7L1LWbvjdSQ2bTDeQ+1DVeC+/jS4gJA4=";
};
}This greatly reduces the amount of IFD needed for building packages from Hackage.
See the PR adding this feature for more information: #65
This won't affect users who don't specify the new all-cabal-nixes argument.
v5.1.0
Adds os-string and ghc-internal to list of GHC boot libraries. This is normally required for using stacklock2nix with >= GHC-9.10 / stackage nightly as of 2024-12-11. Added in #64. Thanks to @Mr-Andersen!
(At the time of writing Stackage LTS is LTS-23, which is using GHC-9.8.4 so doesn't need the fix included in this release.)
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)
v4.2.0
-
Add a new
devShellPkgSetModifierfor giving the user a hook to modify the Haskell package set used to generate the development shell. See here for documentation. Added in #59. -
Add a new
devShellArgsModifierfor giving the user a hook to modify the arguments passed toshellForwhen generating the development shell. See here for documentation. Added in #59. Heavily inspired by #57. Thanks @haruki7049! -
Various additions to the suggestedOverlay.nix file to get more Haskell packages building by default:
- mark
binary-searchasdontCheck - mark
haskoin-coreasdontCheck - mark
hedisasdontCheck - mark
http-clientasdontCheck - mark
http-client-opensslasdontCheck - mark
http-client-tlsasdontCheck - mark
http-conduitasdontCheck - mark
js-queryasdontCheck - mark
prettyprinterasdontCheck - mark
servant-openapi3asdontCheck - mark
servant-rate-limitasdontCheck - mark
wai-rate-limit-redisasdontCheck
Added in #59.
- mark
v4.1.0
-
Add build depend on system
tzdatapackage for the Haskelltzandtzdatapackages innix/build-support/stacklock2nix/suggestedOverlay.nix. Fixed in #52. -
Make sure Haskell packages specified as Git repos in the
stack.yamlfile check out all submodules when fetching their source. Fixed in #53. Thanks to @isomorpheme for reporting this. -
Change handling of subdirs for
gitextra-deps.stacklock2nixinternally callscabal2nixto generate Nix expressions for Haskell packages. In previous versions ofstacklock2nix, the actualsubdirfor agitextra-dep would be copied to the Nix store, and thencabal2nixwould be run on it.This has been fixed to instead call
cabalni2xon the full Git repo, but pass the--subpathto specify the sub package. This likely works better where sub paths contain soft links to other paths in the Git repo.It is unlikely this change will cause any problems for any current users of
stacklock2nix.Fixed in #46 and #56. Thanks to @isomorpheme
-
Make
stacklock2nix'sfromYAMLfunction more reliable.stacklock2nixinternally uses theremarshaltool for converting from thestack.yamlfile to a JSON, in order to read it with Nix.Recent versions of
remarshal(>= 0.17.0) changed functionality to fail at runtime more often. An new flag is needed on the command line to fall back to the old functionality.Fixed in #55. Thanks to @Mr-Andersen
v4.0.2
Fix a bug where stacklock2nix would throw an error if there were no local packages defined in the input stack.yaml file.
This PR also makes stacklock2nix use a default package of "." if the top-level packages key is missing from the stack.yaml file. This matches stack's behavior.
Fixed in #50. Thanks @chris-martin for reporting this.
v4.0.1
-
Download
.cabalfile revisions from the public Casa instance instead of Hackage.We believe this change shouldn't affect any end users, but we now depend on https://casa.stackage.org instead of Hackage. If Casa ends up having signficantly worse uptime than Hackage, then users may be affected when trying to use stacklock2nix. Please let us know if this ends up affecting you.