Merge pull request #57296 from kalbasit/nixpkgs_go-fixes

Fixes to a few Go packages.
This commit is contained in:
Wael Nasreddine 2019-03-11 13:11:11 -07:00 committed by GitHub
commit c75cb87721
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 10 additions and 11 deletions

View File

@ -13,11 +13,11 @@ stdenv.mkDerivation rec {
buildInputs = [ ruby bundler go ]; buildInputs = [ ruby bundler go ];
GOCACHE="$TMPDIR/go-cache";
patches = [ ./remove-hardcoded-locations.patch ]; patches = [ ./remove-hardcoded-locations.patch ];
installPhase = '' installPhase = ''
export GOCACHE="$TMPDIR/go-cache"
ruby bin/compile ruby bin/compile
mkdir -p $out/ mkdir -p $out/
cp -R . $out/ cp -R . $out/

View File

@ -94,13 +94,14 @@ rec {
dontStrip = true; dontStrip = true;
buildPhase = (optionalString (stdenv.isLinux) '' buildPhase = ''
export GOCACHE="$TMPDIR/go-cache"
'' + (optionalString (stdenv.isLinux) ''
# build engine # build engine
cd ./components/engine cd ./components/engine
export AUTO_GOPATH=1 export AUTO_GOPATH=1
export DOCKER_GITCOMMIT="${rev}" export DOCKER_GITCOMMIT="${rev}"
export VERSION="${version}" export VERSION="${version}"
export GOCACHE="$TMPDIR/go-cache"
./hack/make.sh dynbinary ./hack/make.sh dynbinary
cd - cd -
'') + '' '') + ''

View File

@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
makeFlags = [ makeFlags = [
"PREFIX=$(out)" "PREFIX=$(out)"
"GOCACHE=$TMPDIR/go-cache" "GOCACHE=$(TMPDIR)/go-cache"
]; ];
passthru.updateScript = deepin.updateScript { inherit name; }; passthru.updateScript = deepin.updateScript { inherit name; };

View File

@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
makeFlags = [ makeFlags = [
"PREFIX=$(out)" "PREFIX=$(out)"
"GOCACHE=$TMPDIR/go-cache" "GOCACHE=$(TMPDIR)/go-cache"
]; ];
passthru.updateScript = deepin.updateScript { inherit name; }; passthru.updateScript = deepin.updateScript { inherit name; };

View File

@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true; enableParallelBuilding = true;
NIX_CFLAGS_COMPILE = "-Wno-error"; NIX_CFLAGS_COMPILE = "-Wno-error";
GOCACHE="$TMPDIR/go-cache"; makeFlags = [ "GOCACHE=$(TMPDIR)/go-cache" ];
installPhase = '' installPhase = ''
mkdir -p $out/bin $out/include $out/lib mkdir -p $out/bin $out/include $out/lib

View File

@ -13,9 +13,8 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ go ]; nativeBuildInputs = [ go ];
GOCACHE="$TMPDIR/go-cache";
buildPhase = '' buildPhase = ''
export GOCACHE="$TMPDIR/go-cache"
mkdir -p Godeps/_workspace/src/github.com/google/ mkdir -p Godeps/_workspace/src/github.com/google/
ln -s $(pwd) Godeps/_workspace/src/github.com/google/cadvisor ln -s $(pwd) Godeps/_workspace/src/github.com/google/cadvisor
GOPATH=$(pwd)/Godeps/_workspace go build -v -o cadvisor github.com/google/cadvisor GOPATH=$(pwd)/Godeps/_workspace go build -v -o cadvisor github.com/google/cadvisor

View File

@ -13,8 +13,6 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ go gox removeReferencesTo ]; nativeBuildInputs = [ go gox removeReferencesTo ];
GOCACHE="$TMPDIR/go-cache";
preBuild = '' preBuild = ''
patchShebangs ./ patchShebangs ./
substituteInPlace scripts/build.sh --replace 'git rev-parse HEAD' 'echo ${src.rev}' substituteInPlace scripts/build.sh --replace 'git rev-parse HEAD' 'echo ${src.rev}'
@ -24,6 +22,7 @@ stdenv.mkDerivation rec {
ln -s $(pwd) src/github.com/hashicorp/vault ln -s $(pwd) src/github.com/hashicorp/vault
export GOPATH=$(pwd) export GOPATH=$(pwd)
export GOCACHE="$TMPDIR/go-cache"
''; '';
installPhase = '' installPhase = ''