Merge pull request #48020 from erictapen/47709-fix-regex

buildRustPackage: fix regex for separating lib and bin
This commit is contained in:
Timo Kaufmann 2018-10-10 19:29:09 +02:00 committed by GitHub
commit 1aff3da14e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -92,8 +92,8 @@ in stdenv.mkDerivation (args // {
installPhase = args.installPhase or '' installPhase = args.installPhase or ''
runHook preInstall runHook preInstall
mkdir -p $out/bin $out/lib mkdir -p $out/bin $out/lib
find target/release -maxdepth 1 -type f -executable ! \( -regex ".*.\(so.[0-9.]+\|so\|a\|dylib\)" \) -print0 | xargs -r -0 cp -t $out/bin find target/release -maxdepth 1 -type f -executable ! \( -regex ".*\.\(so.[0-9.]+\|so\|a\|dylib\)" \) -print0 | xargs -r -0 cp -t $out/bin
find target/release -maxdepth 1 -regex ".*.\(so.[0-9.]+\|so\|a\|dylib\)" -print0 | xargs -r -0 cp -t $out/lib find target/release -maxdepth 1 -regex ".*\.\(so.[0-9.]+\|so\|a\|dylib\)" -print0 | xargs -r -0 cp -t $out/lib
rmdir --ignore-fail-on-non-empty $out/lib $out/bin rmdir --ignore-fail-on-non-empty $out/lib $out/bin
runHook postInstall runHook postInstall
''; '';