buildRustPackage: fix regex for separating lib and bin

E.g. exa was wrongly put into /lib, as it matches

  .*.a

but not

  .*\.a
This commit is contained in:
Justin Humm 2018-10-07 22:14:19 +02:00
parent c606de191f
commit 64d0676fe1
No known key found for this signature in database
GPG Key ID: 5F24E3BD56617EB2

View File

@ -92,8 +92,8 @@ in stdenv.mkDerivation (args // {
installPhase = args.installPhase or ''
runHook preInstall
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 -regex ".*.\(so.[0-9.]+\|so\|a\|dylib\)" -print0 | xargs -r -0 cp -t $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 -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
runHook postInstall
'';