astro / nix-openwrt-imagebuilder

Build OpenWRT images in Nix derivations
MIT License
129 stars 16 forks source link

error: hash mismatch in fixed-output derivation #31

Closed jfly closed 1 year ago

jfly commented 1 year ago

I put together a simple repo here:

$ nix build github:jfly/nix-openwrt-imagebuilder-bug-demo/fod-hash-mismatch#my-router
error:
       … while calling the 'derivationStrict' builtin

         at //builtin/derivation.nix:9:12: (source not available)

       … while evaluating derivation 'openwrt-22.03.5-nix-ramips-mt7621-tplink_archer-a6-v3'
         whose name attribute is located at /nix/store/cxh34lzvpqb0i2ajrqi5wrw3pcsmxiwd-source/pkgs/stdenv/generic/make-derivation.nix:303:7

       … while evaluating attribute 'configurePhase' of derivation 'openwrt-22.03.5-nix-ramips-mt7621-tplink_archer-a6-v3'

         at /nix/store/53408q2zx649lnvpajjrmchdln293nlr-source/builder.nix:70:3:

           69|
           70|   configurePhase =
             |   ^
           71|     let

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: hash mismatch in fixed-output derivation '/nix/store/arlyfsp749q2bz0063pnhw7lmlsaaris-Packages.drv':
         specified: sha256-oPly/SWMtFTivgVe12WBNI/U34WmMWSs+SS7t9s2ypI=
            got:    sha256-x3MwaM53vqCBBieT+AcRZWF+TSWe9asdIgQgDDj5Yf0=
astro commented 1 year ago

Sadly, this is expected. I have expanded the section in the README.

jfly commented 1 year ago

Ah, that updated README is very helpful, thank you! I had seen that section before and totally ignored it as a "this is only relevant to folks developing nix-openwrt-imagebuilder itself, not someone who just wants to use it". Now I understand why it's important!