From 0197bfeeea226fdcdf8286079e59c9867b14af66 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Mon, 8 Aug 2022 07:06:45 +1000 Subject: [PATCH] go: merge postConfigure/postBuild into empty buildPhase --- pkgs/development/compilers/go/1.18.nix | 10 ++++++---- pkgs/development/compilers/go/1.19.nix | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/pkgs/development/compilers/go/1.18.nix b/pkgs/development/compilers/go/1.18.nix index 0d1eb189f315..fc19e4526882 100644 --- a/pkgs/development/compilers/go/1.18.nix +++ b/pkgs/development/compilers/go/1.18.nix @@ -116,7 +116,8 @@ stdenv.mkDerivation rec { GOROOT_BOOTSTRAP = "${goBootstrap}/share/go"; - postConfigure = '' + buildPhase = '' + runHook preBuild export GOCACHE=$TMPDIR/go-cache # this is compiled into the binary export GOROOT_FINAL=$out/share/go @@ -129,10 +130,11 @@ stdenv.mkDerivation rec { export CC=${buildPackages.stdenv.cc}/bin/cc ''} ulimit -a - ''; - postBuild = '' - (cd src && ./make.bash) + pushd src + ./make.bash + popd + runHook postBuild ''; preInstall = '' diff --git a/pkgs/development/compilers/go/1.19.nix b/pkgs/development/compilers/go/1.19.nix index 3f812024fe54..565e68d5e35a 100644 --- a/pkgs/development/compilers/go/1.19.nix +++ b/pkgs/development/compilers/go/1.19.nix @@ -116,7 +116,8 @@ stdenv.mkDerivation rec { GOROOT_BOOTSTRAP = "${goBootstrap}/share/go"; - postConfigure = '' + buildPhase = '' + runHook preBuild export GOCACHE=$TMPDIR/go-cache # this is compiled into the binary export GOROOT_FINAL=$out/share/go @@ -129,10 +130,11 @@ stdenv.mkDerivation rec { export CC=${buildPackages.stdenv.cc}/bin/cc ''} ulimit -a - ''; - postBuild = '' - (cd src && ./make.bash) + pushd src + ./make.bash + popd + runHook postBuild ''; preInstall = ''