Skip to content

Releases: cdepillabout/stacklock2nix

v5.2.3

Choose a tag to compare

@cdepillabout cdepillabout released this 29 Jan 06:59

This release fixes a build failure when using all-cabal-nixes:

  • Fix build failure when using all-cabal-nixes and 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

Choose a tag to compare

@cdepillabout cdepillabout released this 28 Jan 09:08

This release fixes compatibility with newer versions of some Haskell packages:

  • Handle splitmix >= 0.1.3.2 no longer having a testu01 test suite. Starting in splitmix-0.1.3.2, the testu01 test suite was removed and moved to a separate package. #72

  • Add dontCheck for integer-logarithms. The test suite requires a version of QuickCheck that is not in Stackage LTS-24. #72

v5.2.1

Choose a tag to compare

@cdepillabout cdepillabout released this 26 Sep 10:23
246cae9

This release just adds some overrides for additional Haskell packages.

v5.2.0

Choose a tag to compare

@cdepillabout cdepillabout released this 28 Mar 08:40
108f6ab

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

Choose a tag to compare

@cdepillabout cdepillabout released this 19 Mar 06:52

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

Choose a tag to compare

@cdepillabout cdepillabout released this 07 Mar 07:35
47dd3fb

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-hashes to newPkgSet.
    Fixed in #62.
    Thanks to @Mr-Andersen for reporting this.

A few other small changes:

  • Expose some additional passthru values on Haskell derivations generated
    by stacklock2nix.

    All Haskell derivations generated with stacklock2nix now have a
    passthru.stacklock2nix key, which is an attrset filled with the
    following keys. All keys have a Bool value:

    • is-local-pkg: Is this a local package defined in stack.yaml?
    • is-extra-dep: Is this an extra-dep defined in stack.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 passthru values on the Haskell dev shell generated
    by stacklock2nix.

    The dev shells generated with stacklock2nix now have a
    passthru.stacklock2nix key, 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 the devShellPkgSetModifier, in order
      to inspect the final package set produced after applying devShellPkgSetModifier.
    • shell-for-args: The passed to shellFor in order to produce the dev shell.
      This is an attrset.

    Added in #63

  • Mark some additional packages as dontCheck in suggestedOverlay:

    • cborg
    • lifted-base
    • serialise
    • servant-cassava

    Implemented in #62

  • Pass null as the pgp-wordlist argument to prettyprinter.
    pgp-wordlist is a test dep, but it is not in stackage.

    Implemented in #62

    (Tests for prettyprinter were disabled in suggestedOverlay in
    #59)

v4.2.0

Choose a tag to compare

@cdepillabout cdepillabout released this 21 Feb 06:39
bfef245
  • Add a new devShellPkgSetModifier for 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 devShellArgsModifier for giving the user a hook to modify the arguments passed to shellFor when 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-search as dontCheck
    • mark haskoin-core as dontCheck
    • mark hedis as dontCheck
    • mark http-client as dontCheck
    • mark http-client-openssl as dontCheck
    • mark http-client-tls as dontCheck
    • mark http-conduit as dontCheck
    • mark js-query as dontCheck
    • mark prettyprinter as dontCheck
    • mark servant-openapi3 as dontCheck
    • mark servant-rate-limit as dontCheck
    • mark wai-rate-limit-redis as dontCheck

    Added in #59.

v4.1.0

Choose a tag to compare

@cdepillabout cdepillabout released this 11 Nov 23:21
3cb77e9
  • Add build depend on system tzdata package for the Haskell tz and tzdata packages in nix/build-support/stacklock2nix/suggestedOverlay.nix. Fixed in #52.

  • Make sure Haskell packages specified as Git repos in the stack.yaml file check out all submodules when fetching their source. Fixed in #53. Thanks to @isomorpheme for reporting this.

  • Change handling of subdirs for git extra-deps.

    stacklock2nix internally calls cabal2nix to generate Nix expressions for Haskell packages. In previous versions of stacklock2nix, the actual subdir for a git extra-dep would be copied to the Nix store, and then cabal2nix would be run on it.

    This has been fixed to instead call cabalni2x on the full Git repo, but pass the --subpath to 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's fromYAML function more reliable.

    stacklock2nix internally uses the remarshal tool for converting from the stack.yaml file 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

Choose a tag to compare

@cdepillabout cdepillabout released this 13 Aug 11:22
6869a0d

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

Choose a tag to compare

@cdepillabout cdepillabout released this 12 Jan 09:22
  • Download .cabal file 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.

    Added in #42. Thanks @TeofilC!