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
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 cardano.stackexchange.com/questions/367/… . 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