Skip to content

Commit

Permalink
buildRustPackage: fix regex for separating lib and bin
Browse files Browse the repository at this point in the history
E.g. exa was wrongly put into /lib, as it matches

  .*.a

but not

  .*\.a
  • Loading branch information
erictapen committed Oct 7, 2018
1 parent c606de1 commit 64d0676
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkgs/build-support/rust/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
'';
Expand Down

0 comments on commit 64d0676

Please sign in to comment.