4

I keep getting the Hash Mismatch Error, anyway I can resolve it or get around it?

hash mismatch in fixed-output derivation '/nix/store/7y3jr1jvzkj2146h7sivw0sfr2bhap3j-ghc-8.4.4-x86_64-deb8-linux.tar.xz':
wanted: sha256:06mb0l3y3gbs8znafxskzrkvgf2wbl0m22xsxhs3wzvbyxbqhajc
got:    sha256:0nx6459adisd4p5mjb03yp5jbaxplkjvwzfgkyw3bmwb3g9fgi9j
cannot build derivation '/nix/store/p68295cg7f09il07dsjpyskkmw9ms22f-ghc-8.4.4.drv': 1 dependencies couldn't be built
1
  • 1
    can you post the steps you have tried and the platform in which you are tying please
    – raghu
    Commented May 5, 2021 at 18:18

1 Answer 1

1

You can get away with the mismatch between the ghc nix derivations: Tell Nix to use the IOHK binary cache. (It is indeed indicated as "IMPORTANT" the we should enable the IOHK binary cache at the top of the Plutus README file)

On tradition linuxes, that should do it:

sudo mkdir -p /etc/nix
cat <<EOF | sudo tee /etc/nix/nix.conf
substituters = https://cache.nixos.org https://hydra.iohk.io
trusted-public-keys = iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
EOF

On NixOs:
# configuration.nix
{ config, pkgs, ... }:
{
  # ... all the rest of the configuration of the server

  # iohk binary caches
  nix = 
  {
    binaryCaches          = [ "https://hydra.iohk.io" "https://iohk.cachix.org" ];
    binaryCachePublicKeys = [ "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" "iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo=" ];
  };
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.