diff --git a/pkgs/development/go-modules/generic/default.nix b/pkgs/development/go-modules/generic/default.nix index 3faa4c268ac0..0e092473bd52 100644 --- a/pkgs/development/go-modules/generic/default.nix +++ b/pkgs/development/go-modules/generic/default.nix @@ -103,6 +103,7 @@ go.stdenv.mkDerivation ( '') + '' export GOPATH=$NIX_BUILD_TOP/go:$GOPATH + export GOCACHE=$TMPDIR/go-cache runHook postConfigure ''; @@ -193,9 +194,6 @@ go.stdenv.mkDerivation ( find $bin/bin -type f -exec ${removeExpr removeReferences} '{}' + || true ''; - # Disable go cache, which is not reused in nix anyway - GOCACHE = "off"; - shellHook = '' d=$(mktemp -d "--suffix=-$name") '' + toString (map (dep: ''