buildGoPackage: Only install files from the goPackagePath
This commit is contained in:
parent
9a159fc2bc
commit
f247481b5d
@ -113,12 +113,12 @@ go.stdenv.mkDerivation (
|
|||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
|
|
||||||
if [ -z "$dontInstallSrc" ]; then
|
if [ -z "$dontInstallSrc" ]; then
|
||||||
local dir
|
(cd "$NIX_BUILD_TOP/go"
|
||||||
for d in pkg src; do
|
find . -type f | while read f; do
|
||||||
mkdir -p $out/share/go
|
echo "$f" | grep -q '^./\(src\|pkg/[^/]*\)/${goPackagePath}' || continue
|
||||||
dir="$NIX_BUILD_TOP/go/$d"
|
mkdir -p "$(dirname "$out/share/go/$f")"
|
||||||
[ -e "$dir" ] && cp -r $dir $out/share/go
|
cp $NIX_BUILD_TOP/go/$f $out/share/go/$f
|
||||||
done
|
done)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dir="$NIX_BUILD_TOP/go/bin"
|
dir="$NIX_BUILD_TOP/go/bin"
|
||||||
|
Loading…
Reference in New Issue
Block a user