Skip to content

Overriding a Haskell package dependency version #28

Answered by srid
wolverian asked this question in Q&A
Discussion options

You must be logged in to vote

Note to self: I should explain source-overrides in https://srid.ca/haskell-flake/dependency

Unlike overrides, when using source-overrides you are required to specify a Nix path value. This could be a flake input (with flake = false;); see "ema", "heist-extra" and "tailwind" in https://github.com/EmaApps/emanote/blob/master/flake.nix as an example.

That said, if you are trying to use a specific version on Hackage, you should instead use overrides and callHackage:

haskellProjects.default = 
  overrides = self: super: {
    hspec-contrib = self.callHackage "hspec-contrib" "0.5.1.1" {};
  };
};

By the way, you can also use this overlay directly if you want GHC 9.4 support: https://horizon-has…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@wolverian
Comment options

@wolverian
Comment options

@srid
Comment options

srid Oct 25, 2022
Maintainer

Answer selected by wolverian
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants