Skip to content

v5.0.0

Choose a tag to compare

@cdepillabout cdepillabout released this 07 Mar 07:35
· 25 commits to main since this release
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)