make stacklock2nix figure out the ghc version it needs automatically #4
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
I think it should be possible to make
stacklock2nix
figure out the ghc version is needs automatically.Currently, the API of
stacklock2nix
requires you to pass a full package set, like the following (thebaseHaskellPkgSet
attr):stacklock2nix/my-example-haskell-lib-easy/flake.nix
Lines 41 to 56 in ac35783
It should be possible for
stacklock2nix
to figure out the GHC version automatically from the stackage package set, and then use that internally. I imagine an API like the following would be possible:stacklock2nix
would internally look in the resolver instack.yaml.lock
, figure out it uses GHC-9.2.4, translate that tohaskell.packages.ghc924
, and then just use that.If a user wanted to use a different package set (like
haskell.packages.native-bignum.ghc924
), then they could just fall-back to using thebaseHaskellPkgSet
argument.The text was updated successfully, but these errors were encountered: