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 /pkgs/development/go-modules/generic | |
parent | 9ac64e5bb65aeca34bef01e48fefaea186428bc1 (diff) | |
download | nixpkgs-9bbfc6f6e2c7d84136d344ca3182a47cb14cb32b.tar nixpkgs-9bbfc6f6e2c7d84136d344ca3182a47cb14cb32b.tar.gz nixpkgs-9bbfc6f6e2c7d84136d344ca3182a47cb14cb32b.tar.bz2 nixpkgs-9bbfc6f6e2c7d84136d344ca3182a47cb14cb32b.tar.lz nixpkgs-9bbfc6f6e2c7d84136d344ca3182a47cb14cb32b.tar.xz nixpkgs-9bbfc6f6e2c7d84136d344ca3182a47cb14cb32b.tar.zst nixpkgs-9bbfc6f6e2c7d84136d344ca3182a47cb14cb32b.zip |
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
Diffstat (limited to 'pkgs/development/go-modules/generic')
-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 3faa4c268ac..0e092473bd5 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: '' |