diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2018-10-28 13:45:56 +0000 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2018-10-28 13:51:16 +0000 |
commit | 9bbfc6f6e2c7d84136d344ca3182a47cb14cb32b (patch) | |
tree | fe81e149dd58f63c5c91b47c8280f75c25d63613 | |
parent | 9ac64e5bb65aeca34bef01e48fefaea186428bc1 (diff) |
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
-rw-r--r-- | pkgs/development/go-modules/generic/default.nix | 4 |
1 files changed, 1 insertions, 3 deletions
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: '' |