mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
1d0a930d27
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`.
33 lines
844 B
Nix
33 lines
844 B
Nix
{ stdenv, fetchurl, perlPackages, makeWrapper }:
|
|
|
|
perlPackages.buildPerlPackage {
|
|
pname = "File-Rename";
|
|
version = "0.20";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://cpan/authors/id/R/RM/RMBARKER/File-Rename-0.20.tar.gz";
|
|
sha256 = "1cf6xx2hiy1xalp35fh8g73j67r0w0g66jpcbc6971x9jbm7bvjy";
|
|
};
|
|
|
|
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}
|
|
'';
|
|
|
|
doCheck = !stdenv.isDarwin;
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "Perl extension for renaming multiple files";
|
|
license = licenses.artistic1;
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
};
|
|
}
|