New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
buildGoPackage: re-enable GOCACHE #49346
Conversation
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
@@ -103,6 +103,7 @@ go.stdenv.mkDerivation ( | |||
|
|||
'') + '' | |||
export GOPATH=$NIX_BUILD_TOP/go:$GOPATH | |||
export GOCACHE=$TMPDIR/go-cache |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be /build/go-cache in practice.
@@ -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"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was also set in nix-shell
which was not ideal.
@GrahamcOfBorg build direnv |
Success on aarch64-linux (full log) Attempted: direnv Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: direnv Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: direnv Partial log (click to expand)
|
Tested on a significant part of our go packages. |
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
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)