Merge pull request #43328 from adisbladis/buildGoPackage-nosrc
buildGoPackage: Dont copy sources to $out
This commit is contained in:
commit
c7af2af455
@ -12,17 +12,6 @@ buildGoPackage rec {
|
|||||||
# Fixes Cgo related build failures (see https://github.com/NixOS/nixpkgs/issues/25959 )
|
# Fixes Cgo related build failures (see https://github.com/NixOS/nixpkgs/issues/25959 )
|
||||||
hardeningDisable = [ "fortify" ];
|
hardeningDisable = [ "fortify" ];
|
||||||
|
|
||||||
# Only install binaries in $out, source is not interesting and takes ~50M
|
|
||||||
outputs = [ "out" ];
|
|
||||||
preFixup = ''
|
|
||||||
export bin="''${out}"
|
|
||||||
'';
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/bin $out
|
|
||||||
dir="$NIX_BUILD_TOP/go/bin"
|
|
||||||
[ -e "$dir" ] && cp -r $dir $out
|
|
||||||
'';
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "ethereum";
|
owner = "ethereum";
|
||||||
repo = "go-ethereum";
|
repo = "go-ethereum";
|
||||||
|
@ -176,15 +176,6 @@ go.stdenv.mkDerivation (
|
|||||||
installPhase = args.installPhase or ''
|
installPhase = args.installPhase or ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
mkdir -p $out
|
|
||||||
pushd "$NIX_BUILD_TOP/go"
|
|
||||||
while read f; do
|
|
||||||
echo "$f" | grep -q '^./\(src\|pkg/[^/]*\)/${goPackagePath}' || continue
|
|
||||||
mkdir -p "$(dirname "$out/share/go/$f")"
|
|
||||||
cp "$NIX_BUILD_TOP/go/$f" "$out/share/go/$f"
|
|
||||||
done < <(find . -type f)
|
|
||||||
popd
|
|
||||||
|
|
||||||
mkdir -p $bin
|
mkdir -p $bin
|
||||||
dir="$NIX_BUILD_TOP/go/bin"
|
dir="$NIX_BUILD_TOP/go/bin"
|
||||||
[ -e "$dir" ] && cp -r $dir $bin
|
[ -e "$dir" ] && cp -r $dir $bin
|
||||||
|
Loading…
x
Reference in New Issue
Block a user