input-output-hk / haskell.nix

Alternative Haskell Infrastructure for Nixpkgs
https://input-output-hk.github.io/haskell.nix
Apache License 2.0
558 stars 240 forks source link

How does one force a package to use a different version? #1538

Closed qwbarch closed 2 years ago

qwbarch commented 2 years ago

Gabriella has a tutorial for this if one chooses to use cabal2nix. What's the equivalent of this for haskell.nix? I feel like it's something in here, but I can't quite figure it out. Am I overthinking this and I can simply define the version in the cabal file still?

ocharles commented 2 years ago

Haskell.nix just uses whatever cabal configure chooses. So if you want a specific version, you can add constraints: ... to your cabal.project.

qwbarch commented 2 years ago

@ocharles Thanks!