<p>This question is indeed a dupplicate of <a href="https://cardano.stackexchange.com/questions/367/hash-mismatch-error-on-plutus-and-nix">Hash MisMatch Error on Plutus and Nix</a></p>
<p>If you look more closer at the entire error log, there is a mismatch in the sha256 singature of the derivation of ghc:
<code>hash mismatch in fixed-output derivation '/nix/store/7y3jr1jvzkj2146h7sivw0sfr2bhap3j-ghc-8.4.4-x86_64-deb8-linux.tar.xz</code></p>
<p>Same answer, same workaround: the problem disappears when using the IOHK bianry cache for nix.
And there's is indeed an &quot;IMPORTANT&quot; mention at the begining of plutus REAME file asking to do this.</p>
<hr>
On NixOs:
<pre><code># configuration.nix
{ config, pkgs, ... }:
{
  # ... all the rest of the configuration of the server

  # iohk binary caches
  nix = 
  {
    binaryCaches          = [ &quot;https://hydra.iohk.io&quot; &quot;https://iohk.cachix.org&quot; ];
    binaryCachePublicKeys = [ &quot;hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=&quot; &quot;iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo=&quot; ];
  };
}
</code></pre>
<hr>
Ubuntu and other Linuxes
<p>Nix has a configuration in <code>/etc/nix/nix.conf</code>. So as to use the IOHK binary cache you have to modify this file:</p>
<p>In the documentation it is said</p>
<pre><code>sudo mkdir -p /etc/nix
cat &lt;&lt;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
</code></pre>

CC BY-SA 4.0
2021-05-06T10:00:39.193Z
2021-05-07T05:53:53.940Z
2021-05-07T05:53:53.940Z
Stephane Rolland
<p>I was doing the plutus pioneer program and ran into an error when starting a <code>nix-shell</code> at the top-level directory of the plutus-repository.</p>
<p>I ran into the same error on <code>Ubuntu  20.04.2 LTS (GNU/Linux 4.4.0-19041-Microsoft x86_64) </code> and <code>NixOS (20.09.4029.4a154d47623 (Nightingale) on VirtualBox)</code>.</p>
<p>I also did set up the IOHK binary caches on both systems.</p>
<p>I got the following error when running <code>nix-shell</code>:</p>
<pre><code>error: build of '/nix/store/z6w41a6dv151g2q95v91yywid7s8mkn5-Agda-plan-to-nix-pkgs.drv' failed
(use '--show-trace' to show detailed location information)
</code></pre>
<p>The <code>nix-shell --show-trace</code> command shows the following error:</p>
<pre><code>error: while evaluating the attribute 'nativeBuildInputs' of the derivation 'ghc-shell-for-packages' at /nix/store/przi4l85b1yd1irwss0qnhg1lsw2925k-haskell.nix-src/builder/shell-for.nix:115:5:
while evaluating 'chooseDevOutputs' at /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/lib/attrsets.nix:475:22, called from undefined position:
while evaluating 'mergeInputs' at /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/pkgs/build-support/mkshell/default.nix:14:17, called from /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/pkgs/build-support/mkshell/default.nix:32:23:
while evaluating anonymous function at /nix/store/przi4l85b1yd1irwss0qnhg1lsw2925k-haskell.nix-src/builder/shell-for.nix:57:20, called from undefined position:
while evaluating the attribute 'name' at /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/pkgs/build-support/trivial-builders.nix:7:7:
while evaluating 'sanitizeDerivationName' at /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/lib/strings.nix:746:28, called from /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating 'pipe' at /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/lib/trivial.nix:61:15, called from /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/lib/strings.nix:746:36:
while evaluating 'reverseApply' at /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/lib/trivial.nix:62:27, called from /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/lib/trivial.nix:63:8:
while evaluating the attribute 'version' at /home/demo/plutus/nix/pkgs/default.nix:68:15:
while evaluating the attribute 'extraPackages.Agda' at /home/demo/plutus/nix/pkgs/haskell/extra.nix:98:31:
while evaluating the attribute 'hsPkgs' at /nix/store/przi4l85b1yd1irwss0qnhg1lsw2925k-haskell.nix-src/overlays/haskell.nix:546:15:
while evaluating the attribute 'hsPkgs' at /nix/store/przi4l85b1yd1irwss0qnhg1lsw2925k-haskell.nix-src/overlays/haskell.nix:526:43:
while evaluating anonymous function at /nix/store/przi4l85b1yd1irwss0qnhg1lsw2925k-haskell.nix-src/lib/import-and-filter-project.nix:5:1, called from /nix/store/przi4l85b1yd1irwss0qnhg1lsw2925k-haskell.nix-src/overlays/haskell.nix:504:27:
build of '/nix/store/z6w41a6dv151g2q95v91yywid7s8mkn5-Agda-plan-to-nix-pkgs.drv' failed
</code></pre>
<p>Does anyone have an idea how to fix this? I couldn't find anything online or in the cardano forum.</p>
<p>EDIT: running <code>nix-shell --show-trace</code> I have the additional error:</p>
<pre><code>error: while evaluating the attribute 'buildInputs' of the derivation 'ghc-shell-for-packages' at /nix/store/cf4ksa58yibwkmx2z83y7qd9zwpyjwmy-haskell.nix-src/builder/shell-for.nix:117:5:
while evaluating 'chooseDevOutputs' at /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/lib/attrsets.nix:475:22, called from undefined position:
while evaluating 'mergeInputs' at /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/pkgs/build-support/mkshell/default.nix:14:17, called from /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/pkgs/build-support/mkshell/default.nix:31:17:
while evaluating anonymous function at /nix/store/cf4ksa58yibwkmx2z83y7qd9zwpyjwmy-haskell.nix-src/builder/shell-for.nix:61:20, called from undefined position:
while evaluating the attribute 'nativeBuildInputs' of the derivation 'plutus-metatheory-lib-plutus-metatheory-0.1.0.0' at /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/pkgs/stdenv/generic/make-derivation.nix:192:11:
while evaluating the derivation attribute 'name' at /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/pkgs/build-support/trivial-builders.nix:7:7:
while evaluating 'sanitizeDerivationName' at /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/lib/strings.nix:746:28, called from /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating 'pipe' at /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/lib/trivial.nix:61:15, called from /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/lib/strings.nix:746:36:
while evaluating 'reverseApply' at /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/lib/trivial.nix:62:27, called from /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/lib/trivial.nix:63:8:
while evaluating the attribute 'version' at /cloud/cloud-lite/training/plutus-pioneer-program/plutus-other-repo/plutus/nix/pkgs/default.nix:67:15:
while evaluating the attribute 'extraPackages.Agda' at /cloud/cloud-lite/training/plutus-pioneer-program/plutus-other-repo/plutus/nix/pkgs/haskell/extra.nix:18:3:
while evaluating 'hackage-package' at /nix/store/cf4ksa58yibwkmx2z83y7qd9zwpyjwmy-haskell.nix-src/overlays/haskell.nix:456:11, called from /cloud/cloud-lite/training/plutus-pioneer-program/plutus-other-repo/plutus/nix/pkgs/haskell/extra.nix:18:10:
while evaluating the attribute 'hsPkgs.Agda' at /nix/store/cf4ksa58yibwkmx2z83y7qd9zwpyjwmy-haskell.nix-src/overlays/haskell.nix:536:15:
while evaluating the attribute 'hsPkgs' at /nix/store/cf4ksa58yibwkmx2z83y7qd9zwpyjwmy-haskell.nix-src/overlays/haskell.nix:516:43:
while evaluating 'mkCabalProjectPkgSet' at /nix/store/cf4ksa58yibwkmx2z83y7qd9zwpyjwmy-haskell.nix-src/overlays/haskell.nix:152:13, called from /nix/store/cf4ksa58yibwkmx2z83y7qd9zwpyjwmy-haskell.nix-src/overlays/haskell.nix:501:30:
while evaluating the attribute 'buildPackages.haskell-nix.compiler.&quot;${(((plan-pkgs).pkgs  hackage)).compiler.nix-name}&quot;.version' at /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/lib/attrsets.nix:344:7:
while evaluating anonymous function at /nix/store/cf4ksa58yibwkmx2z83y7qd9zwpyjwmy-haskell.nix-src/lib/import-and-filter-project.nix:5:1, called from /nix/store/cf4ksa58yibwkmx2z83y7qd9zwpyjwmy-haskell.nix-src/overlays/haskell.nix:503:31:
build of '/nix/store/42ml953fywhg2i2fi4mqkq64v4fy512d-Agda-plan-to-nix-pkgs.drv' failed
</code></pre>

CC BY-SA 4.0
2021-05-05T14:36:31.640Z
On what revision of the plutus repository were you seeing this error?
Sebastian Nagel
CC BY-SA 4.0
2021-05-05T15:42:48.983Z
Latest release, i just cloned it yesterday.
Hamza
CC BY-SA 4.0
2021-05-05T19:56:51.837Z
Yes it looks like it's the same error,I'm still trying to fix it with no success so far. 
Which discord community are you referring to ?
Hamza
CC BY-SA 4.0
2021-05-05T23:09:40.580Z
Dunno if the link will work for you, for me it's a IOHK discord channel: https://discord.com/channels/826816523368005654/826822689427554365 moreover I have opened a github issue for Haskell.Nix in case they can help find the problem which seems to occur in the nix derivation of this library: https://github.com/input-output-hk/haskell.nix/issues/1109
Stephane Rolland
CC BY-SA 4.0
2021-05-07T05:50:53.080Z
I have suggested this question as a dupplicate, because if you look at the entire log it contains the same error warning: `hash mismatch in fixed-output derivation '/nix/store/7y3jr1jvzkj2146h7sivw0sfr2bhap3j-ghc-8.4.4-x86_64-deb8-linux.tar.xz`  like in the question Hash MisMatch Error on Plutus and Nix https://cardano.stackexchange.com/questions/367/hash-mismatch-error-on-plutus-and-nix . It is much more focussed on the real issue according to me. I gave the same answer: setting up the IOHK binary cache for nix
Stephane Rolland
<plutus><ubuntu><nixos><nix>
Problem when starting a nix-shell in the plututs repo
# Problem when starting a nix-shell in the plututs repo

(Asked by: username_0 on 2021-05-05)

I was doing the plutus pioneer program and ran into an error when starting a nix-shell at the top-level directory of the plutus-repository.
I ran into the same error on Ubuntu  20.04.2 LTS (GNU/Linux 4.4.0-19041-Microsoft x86_64)  and NixOS (20.09.4029.4a154d47623 (Nightingale) on VirtualBox).
I also did set up the IOHK binary caches on both systems.
I got the following error when running nix-shell:
error: build of '/nix/store/z6w41a6dv151g2q95v91yywid7s8mkn5-Agda-plan-to-nix-pkgs.drv' failed
(use '--show-trace' to show detailed location information)

The nix-shell --show-trace command shows the following error:
error: while evaluating the attribute 'nativeBuildInputs' of the derivation 'ghc-shell-for-packages' at /nix/store/przi4l85b1yd1irwss0qnhg1lsw2925k-haskell.nix-src/builder/shell-for.nix:115:5:
while evaluating 'chooseDevOutputs' at /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/lib/attrsets.nix:475:22, called from undefined position:
while evaluating 'mergeInputs' at /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/pkgs/build-support/mkshell/default.nix:14:17, called from /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/pkgs/build-support/mkshell/default.nix:32:23:
while evaluating anonymous function at /nix/store/przi4l85b1yd1irwss0qnhg1lsw2925k-haskell.nix-src/builder/shell-for.nix:57:20, called from undefined position:
while evaluating the attribute 'name' at /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/pkgs/build-support/trivial-builders.nix:7:7:
while evaluating 'sanitizeDerivationName' at /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/lib/strings.nix:746:28, called from /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating 'pipe' at /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/lib/trivial.nix:61:15, called from /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/lib/strings.nix:746:36:
while evaluating 'reverseApply' at /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/lib/trivial.nix:62:27, called from /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/lib/trivial.nix:63:8:
while evaluating the attribute 'version' at /home/demo/plutus/nix/pkgs/default.nix:68:15:
while evaluating the attribute 'extraPackages.Agda' at /home/demo/plutus/nix/pkgs/haskell/extra.nix:98:31:
while evaluating the attribute 'hsPkgs' at /nix/store/przi4l85b1yd1irwss0qnhg1lsw2925k-haskell.nix-src/overlays/haskell.nix:546:15:
while evaluating the attribute 'hsPkgs' at /nix/store/przi4l85b1yd1irwss0qnhg1lsw2925k-haskell.nix-src/overlays/haskell.nix:526:43:
while evaluating anonymous function at /nix/store/przi4l85b1yd1irwss0qnhg1lsw2925k-haskell.nix-src/lib/import-and-filter-project.nix:5:1, called from /nix/store/przi4l85b1yd1irwss0qnhg1lsw2925k-haskell.nix-src/overlays/haskell.nix:504:27:
build of '/nix/store/z6w41a6dv151g2q95v91yywid7s8mkn5-Agda-plan-to-nix-pkgs.drv' failed

Does anyone have an idea how to fix this? I couldn't find anything online or in the cardano forum.
EDIT: running nix-shell --show-trace I have the additional error:
error: while evaluating the attribute 'buildInputs' of the derivation 'ghc-shell-for-packages' at /nix/store/cf4ksa58yibwkmx2z83y7qd9zwpyjwmy-haskell.nix-src/builder/shell-for.nix:117:5:
while evaluating 'chooseDevOutputs' at /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/lib/attrsets.nix:475:22, called from undefined position:
while evaluating 'mergeInputs' at /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/pkgs/build-support/mkshell/default.nix:14:17, called from /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/pkgs/build-support/mkshell/default.nix:31:17:
while evaluating anonymous function at /nix/store/cf4ksa58yibwkmx2z83y7qd9zwpyjwmy-haskell.nix-src/builder/shell-for.nix:61:20, called from undefined position:
while evaluating the attribute 'nativeBuildInputs' of the derivation 'plutus-metatheory-lib-plutus-metatheory-0.1.0.0' at /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/pkgs/stdenv/generic/make-derivation.nix:192:11:
while evaluating the derivation attribute 'name' at /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/pkgs/build-support/trivial-builders.nix:7:7:
while evaluating 'sanitizeDerivationName' at /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/lib/strings.nix:746:28, called from /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating 'pipe' at /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/lib/trivial.nix:61:15, called from /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/lib/strings.nix:746:36:
while evaluating 'reverseApply' at /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/lib/trivial.nix:62:27, called from /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/lib/trivial.nix:63:8:
while evaluating the attribute 'version' at /cloud/cloud-lite/training/plutus-pioneer-program/plutus-other-repo/plutus/nix/pkgs/default.nix:67:15:
while evaluating the attribute 'extraPackages.Agda' at /cloud/cloud-lite/training/plutus-pioneer-program/plutus-other-repo/plutus/nix/pkgs/haskell/extra.nix:18:3:
while evaluating 'hackage-package' at /nix/store/cf4ksa58yibwkmx2z83y7qd9zwpyjwmy-haskell.nix-src/overlays/haskell.nix:456:11, called from /cloud/cloud-lite/training/plutus-pioneer-program/plutus-other-repo/plutus/nix/pkgs/haskell/extra.nix:18:10:
while evaluating the attribute 'hsPkgs.Agda' at /nix/store/cf4ksa58yibwkmx2z83y7qd9zwpyjwmy-haskell.nix-src/overlays/haskell.nix:536:15:
while evaluating the attribute 'hsPkgs' at /nix/store/cf4ksa58yibwkmx2z83y7qd9zwpyjwmy-haskell.nix-src/overlays/haskell.nix:516:43:
while evaluating 'mkCabalProjectPkgSet' at /nix/store/cf4ksa58yibwkmx2z83y7qd9zwpyjwmy-haskell.nix-src/overlays/haskell.nix:152:13, called from /nix/store/cf4ksa58yibwkmx2z83y7qd9zwpyjwmy-haskell.nix-src/overlays/haskell.nix:501:30:
while evaluating the attribute 'buildPackages.haskell-nix.compiler."${(((plan-pkgs).pkgs  hackage)).compiler.nix-name}".version' at /nix/store/qrbp0y6mfscqhfhzivnhc91hvby45nv7-nixpkgs-src/lib/attrsets.nix:344:7:
while evaluating anonymous function at /nix/store/cf4ksa58yibwkmx2z83y7qd9zwpyjwmy-haskell.nix-src/lib/import-and-filter-project.nix:5:1, called from /nix/store/cf4ksa58yibwkmx2z83y7qd9zwpyjwmy-haskell.nix-src/overlays/haskell.nix:503:31:
build of '/nix/store/42ml953fywhg2i2fi4mqkq64v4fy512d-Agda-plan-to-nix-pkgs.drv' failed

**Tags:** plutus, ubuntu, nixos, nix
> **Comments:**
> **username_1**: On what revision of the plutus repository were you seeing this error?  
> **username_0**: Latest release, i just cloned it yesterday.  
> **username_0**: Yes it looks like it's the same error,I'm still trying to fix it with no success so far.  Which discord community are you referring to ?  
> **username_2**: Dunno if the link will work for you, for me it's a IOHK discord channel: https://discord.com/channels/826816523368005654/826822689427554365 moreover I have opened a github issue for Haskell.Nix in case they can help find the problem which seems to occur in the nix derivation of this library: https://github.com/input-output-hk/haskell.nix/issues/1109  
> **username_2**: I have suggested this question as a dupplicate, because if you look at the entire log it contains the same error warning: `hash mismatch in fixed-output derivation '/nix/store/7y3jr1jvzkj2146h7sivw0sfr2bhap3j-ghc-8.4.4-x86_64-deb8-linux.tar.xz`  like in the question Hash MisMatch Error on Plutus and Nix https://cardano.stackexchange.com/questions/367/hash-mismatch-error-on-plutus-and-nix . It is much more focussed on the real issue according to me. I gave the same answer: setting up the IOHK binary cache for nix  

---

## 1 answers

### Answer by username_2 on 2021-05-06. Score: 0

This question is indeed a dupplicate of Hash MisMatch Error on Plutus and Nix
If you look more closer at the entire error log, there is a mismatch in the sha256 singature of the derivation of ghc:
hash mismatch in fixed-output derivation '/nix/store/7y3jr1jvzkj2146h7sivw0sfr2bhap3j-ghc-8.4.4-x86_64-deb8-linux.tar.xz
Same answer, same workaround: the problem disappears when using the IOHK bianry cache for nix.
And there's is indeed an "IMPORTANT" mention at the begining of plutus REAME file asking to do this.

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=" ];
  };
}


Ubuntu and other Linuxes
Nix has a configuration in /etc/nix/nix.conf. So as to use the IOHK binary cache you have to modify this file:
In the documentation it is said
sudo mkdir -p /etc/nix
cat <


---

