2021-04-12 18:23:04 +00:00
|
|
|
{ lib, stdenv, fetchurl, perl, perlPackages }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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";
|
|
|
|
};
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
# Fix an incorrect platform test that misidentifies Darwin as Windows
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile.PL \
|
|
|
|
--replace '/win/i' '/MSWin32/'
|
|
|
|
'';
|
|
|
|
|
2021-04-12 18:23:04 +00:00
|
|
|
postFixup = ''
|
|
|
|
substituteInPlace $out/bin/rename \
|
|
|
|
--replace "#!${perl}/bin/perl" "#!${perl}/bin/perl -I $out/${perl.libPrefix}"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = !stdenv.isDarwin;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Perl extension for renaming multiple files";
|
|
|
|
license = licenses.artistic1;
|
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "rename";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|