Skip to content

Commit

Permalink
file-rename: Fix an incorrect platform test that misidentifies Darwin…
Browse files Browse the repository at this point in the history
… as Windows

This causes the script to be installed as `file-rename` instead of `rename` like
it is on other Unix systems. This in turn causes `wrapProgram` to fail when
building because it expects the wrapped program to be called `rename`.
  • Loading branch information
neilmayhew committed Jun 27, 2020
1 parent a3013da commit 1d0a930
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkgs/tools/filesystems/file-rename/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ perlPackages.buildPerlPackage {

nativeBuildInputs = [ makeWrapper ];

# Fix an incorrect platform test that misidentifies Darwin as Windows
postPatch = ''
substituteInPlace Makefile.PL \
--replace '/win/i' '/MSWin32/'
'';

postInstall = ''
wrapProgram $out/bin/rename \
--prefix PERL5LIB : $out/${perlPackages.perl.libPrefix}
Expand Down

0 comments on commit 1d0a930

Please sign in to comment.