Hello all,
I’m trying to build a Haskell package, from a cabal file, which has dependencies with quite strict version requirements. For example, it needs tasty-hedgehog
to be between 1.2 and 1.3.
To make sure I’m passing the correct package versions to callCabal2nix
, I’m creating a haskellPackages
set like this:
hsPkgs = final.haskellPackages.override {
overrides = self: super: {
tasty-hedgehog = final.haskell.lib.overrideCabal super.tasty-hedgehog {
version = "1.2.0.0";
revision = "1";
sha256 = "";
};
};
};
The first time I tried this, I got the expected error:
warning: found empty hash, assuming 'sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA='
error: hash mismatch in fixed-output derivation '/nix/store/7j04kcgxx9wn846mhbj8cw1r9q8z64df-tasty-hedgehog-1.2.0.0.tar.gz.drv':
specified: sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
got: sha256-zWUNs1G1r5jxZ+PaY8VA74WF3mcuPUM2vC/vpiDrCi8=
However, if I then replace the empty hash with sha256-zWUN...
hash, I get
error: hash mismatch in fixed-output derivation '/nix/store/ldf283p3413apsgx8nyk7gqg8sliz5rf-tasty-hedgehog-1.2.0.0-r1.cabal.drv':
specified: sha256-fKgQZSu9YaxDJRRsat9QVie4fzGwHQrF07WtobkX8cQ=
got: sha256-T7HZrlePR8DWdxJjlf4cDi50FViq8Wmh0sAVJxw1OYA=
error: 1 dependencies of derivation '/nix/store/qkh33q6irip9kydig2xyph30ri62g7ga-tasty-hedgehog-1.2.0.0.drv' failed to build
I’m not quite sure what to make of this error. The sha256-fKg...
hash that I supposedly specified is not the one I used for tasty-hedgehog
. Is it possible that one of the dependencies of tasty-hedgehog-1.2.0.0
also needs to be specified? If so, adding --show-trace
doesn’t tell me which one.
Grateful for any help.