diff --git a/overrides/buildGo.nix b/overrides/buildGo.nix index 7ba9000e1..72d8c232f 100644 --- a/overrides/buildGo.nix +++ b/overrides/buildGo.nix @@ -50,9 +50,9 @@ let program = { name, srcs, deps ? [] }: let uniqueDeps = allDeps deps; in runCommand name {} '' - ${go}/bin/go tool compile -o ${name}.a -trimpath=$PWD ${includeSources uniqueDeps} ${spaceOut srcs} + ${go}/bin/go tool compile -o ${name}.a -trimpath=$PWD -trimpath=${go} ${includeSources uniqueDeps} ${spaceOut srcs} mkdir -p $out/bin - ${go}/bin/go tool link -o $out/bin/${name} ${includeLibs uniqueDeps} ${name}.a + ${go}/bin/go tool link -o $out/bin/${name} -buildid nix ${includeLibs uniqueDeps} ${name}.a ''; # Build a Go library assembled out of the specified files.