Error overriding library
billksun opened this issue · 1 comments
billksun commented
I tried to follow the instructions for overriding library versions here: https://srid.ca/haskell-template/dependency
However, I am getting the following error:
error: attribute 'callCabal2Nix' missing
at /nix/store/pf28nmzgqjy7sarx5rlhay83jharcrm0-source/flake.nix:30:34:
29| overrides = self: super: with pkgs.haskell.lib; {
30| ihp-hsx = dontCheck (self.callCabal2Nix "ihp-hsx" inputs.ihp-hsx {});
| ^
31| };
Did you mean callCabal2nix?
(use '--show-trace' to show detailed location information)
daanrs commented
I am not the library author, so I might be wrong, but I will try my best to help!
This error is luckily just a typo (I've made the same mistake before), if you use
overrides = self: super: with pkgs.haskell.lib; {
ihp-hsx = dontCheck (self.callCabal2nix "ihp-hsx" inputs.ihp-hsx {});
};
it should work.
Note that in this case you are overriding the ihp-hsx package with a flake input. If you for instance want to override the pre-existing package in nixpkgs to just disable the tests, then you can use something like
overrides = self: super: with pkgs.haskell.lib; {
ihp-hsx = dontCheck super.ihp-hsx;
};