buildGoPackage: re-enable GOCACHE
If projects uses go1.11 modules GOCACHE is required. Also if buildGoPackage is used in a nix-shell setting we don't want to override GOCACHE to allow incremental builds. This should be backported to 18.09
This commit is contained in:
parent
9ac64e5bb6
commit
9bbfc6f6e2
@ -103,6 +103,7 @@ go.stdenv.mkDerivation (
|
|||||||
|
|
||||||
'') + ''
|
'') + ''
|
||||||
export GOPATH=$NIX_BUILD_TOP/go:$GOPATH
|
export GOPATH=$NIX_BUILD_TOP/go:$GOPATH
|
||||||
|
export GOCACHE=$TMPDIR/go-cache
|
||||||
|
|
||||||
runHook postConfigure
|
runHook postConfigure
|
||||||
'';
|
'';
|
||||||
@ -193,9 +194,6 @@ go.stdenv.mkDerivation (
|
|||||||
find $bin/bin -type f -exec ${removeExpr removeReferences} '{}' + || true
|
find $bin/bin -type f -exec ${removeExpr removeReferences} '{}' + || true
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Disable go cache, which is not reused in nix anyway
|
|
||||||
GOCACHE = "off";
|
|
||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
d=$(mktemp -d "--suffix=-$name")
|
d=$(mktemp -d "--suffix=-$name")
|
||||||
'' + toString (map (dep: ''
|
'' + toString (map (dep: ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user