From 268645f5613a13ac8c75183207a6a9bdec82f433 Mon Sep 17 00:00:00 2001 From: Erich Blume Date: Thu, 26 Mar 2026 14:25:33 -0700 Subject: [PATCH] Fix goModules derivation: disable fixup to avoid store path references The Go toolchain auto-download (triggered by `toolchain go1.25.8` in go.mod) puts scripts with shebangs into the module cache. Nix fixup phase patches these to reference /nix/store paths, violating the fixed-output derivation contract. dontFixup = true leaves the cache as-is, which is fine since these files are only consumed as build inputs by the pyroscope derivation. Co-Authored-By: Claude Opus 4.6 (1M context) --- containers/pyroscope/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/containers/pyroscope/default.nix b/containers/pyroscope/default.nix index 54c0f2a..0a47c1e 100644 --- a/containers/pyroscope/default.nix +++ b/containers/pyroscope/default.nix @@ -34,6 +34,10 @@ let cp -r $TMPDIR/go/pkg/mod $out ''; + # Disable fixup: patchelf and patchShebangs modify downloaded Go toolchain + # binaries, which makes the fixed-output derivation reference store paths + dontFixup = true; + outputHashMode = "recursive"; outputHash = pkgs.lib.fakeHash; outputHashAlgo = "sha256";