From f969e6e4744f998454dafad2c69f2ccfbbb16da3 Mon Sep 17 00:00:00 2001 From: Yegor Timoshenko Date: Fri, 12 Oct 2018 19:29:34 +0000 Subject: [PATCH] go: do not wrap with `go get` tools See: https://github.com/NixOS/nixpkgs/issues/46603 These tools are not required for `buildGoPackage`, while significantly affecting closure size and build time. This essentially reverts 458895db332d394bfadc05404a020ea0b4b1ee7f. --- pkgs/development/compilers/go/1.10.nix | 10 ++-------- pkgs/development/compilers/go/1.11.nix | 10 ++-------- pkgs/development/compilers/go/1.9.nix | 10 ++-------- 3 files changed, 6 insertions(+), 24 deletions(-) diff --git a/pkgs/development/compilers/go/1.10.nix b/pkgs/development/compilers/go/1.10.nix index fa4b4abafdee..163577935839 100644 --- a/pkgs/development/compilers/go/1.10.nix +++ b/pkgs/development/compilers/go/1.10.nix @@ -1,8 +1,5 @@ { stdenv, fetchFromGitHub, tzdata, iana-etc, go_bootstrap, runCommand, writeScriptBin -, perl, which, pkgconfig, patch, procps -, pcre, cacert, llvm -, Security, Foundation -, makeWrapper, git, subversion, mercurial, bazaar }: +, perl, which, pkgconfig, patch, procps, pcre, cacert, llvm, Security, Foundation }: let @@ -37,7 +34,7 @@ stdenv.mkDerivation rec { GOCACHE = "off"; # perl is used for testing go vet - nativeBuildInputs = [ perl which pkgconfig patch makeWrapper procps ]; + nativeBuildInputs = [ perl which pkgconfig patch procps ]; buildInputs = [ cacert pcre ] ++ optionals stdenv.isLinux [ stdenv.cc.libc.out ] ++ optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ]; @@ -165,9 +162,6 @@ stdenv.mkDerivation rec { installPhase = '' cp -r . $GOROOT ( cd $GOROOT/src && ./all.bash ) - - # (https://github.com/golang/go/wiki/GoGetTools) - wrapProgram $out/share/go/bin/go --prefix PATH ":" "${stdenv.lib.makeBinPath [ git subversion mercurial bazaar ]}" ''; preFixup = '' diff --git a/pkgs/development/compilers/go/1.11.nix b/pkgs/development/compilers/go/1.11.nix index 56d363f1015f..f58e0801030e 100644 --- a/pkgs/development/compilers/go/1.11.nix +++ b/pkgs/development/compilers/go/1.11.nix @@ -1,8 +1,5 @@ { stdenv, fetchFromGitHub, tzdata, iana-etc, go_bootstrap, runCommand, writeScriptBin -, perl, which, pkgconfig, patch, procps -, pcre, cacert, llvm -, Security, Foundation -, makeWrapper, git, subversion, mercurial, bazaar }: +, perl, which, pkgconfig, patch, procps, pcre, cacert, llvm, Security, Foundation }: let @@ -37,7 +34,7 @@ stdenv.mkDerivation rec { GOCACHE = "off"; # perl is used for testing go vet - nativeBuildInputs = [ perl which pkgconfig patch makeWrapper procps ]; + nativeBuildInputs = [ perl which pkgconfig patch procps ]; buildInputs = [ cacert pcre ] ++ optionals stdenv.isLinux [ stdenv.cc.libc.out ] ++ optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ]; @@ -171,9 +168,6 @@ stdenv.mkDerivation rec { installPhase = '' cp -r . $GOROOT ( cd $GOROOT/src && ./all.bash ) - - # (https://github.com/golang/go/wiki/GoGetTools) - wrapProgram $out/share/go/bin/go --prefix PATH ":" "${stdenv.lib.makeBinPath [ git subversion mercurial bazaar ]}" ''; preFixup = '' diff --git a/pkgs/development/compilers/go/1.9.nix b/pkgs/development/compilers/go/1.9.nix index 48f16c3ffa5a..d6ae163813f3 100644 --- a/pkgs/development/compilers/go/1.9.nix +++ b/pkgs/development/compilers/go/1.9.nix @@ -1,8 +1,5 @@ { stdenv, fetchFromGitHub, tzdata, iana-etc, go_bootstrap, runCommand, writeScriptBin -, perl, which, pkgconfig, patch, procps -, pcre, cacert, llvm -, Security, Foundation -, makeWrapper, git, subversion, mercurial, bazaar }: +, perl, which, pkgconfig, patch, procps, pcre, cacert, llvm, Security, Foundation }: let @@ -35,7 +32,7 @@ stdenv.mkDerivation rec { }; # perl is used for testing go vet - nativeBuildInputs = [ perl which pkgconfig patch makeWrapper procps ]; + nativeBuildInputs = [ perl which pkgconfig patch procps ]; buildInputs = [ cacert pcre ] ++ optionals stdenv.isLinux [ stdenv.cc.libc.out ] ++ optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ]; @@ -165,9 +162,6 @@ stdenv.mkDerivation rec { installPhase = '' cp -r . $GOROOT ( cd $GOROOT/src && ./all.bash ) - - # (https://github.com/golang/go/wiki/GoGetTools) - wrapProgram $out/share/go/bin/go --prefix PATH ":" "${stdenv.lib.makeBinPath [ git subversion mercurial bazaar ]}" ''; preFixup = ''