2021-02-24 20:53:45 +01:00
|
|
|
{ lib, stdenv, fetchurl, perl, perlPackages }:
|
2018-02-04 14:32:09 +01:00
|
|
|
|
2019-06-20 15:07:56 +02:00
|
|
|
perlPackages.buildPerlPackage {
|
|
|
|
pname = "File-Rename";
|
|
|
|
version = "0.20";
|
2018-02-04 14:32:09 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-04-01 03:11:51 +02:00
|
|
|
url = "mirror://cpan/authors/id/R/RM/RMBARKER/File-Rename-0.20.tar.gz";
|
2018-02-04 14:32:09 +01:00
|
|
|
sha256 = "1cf6xx2hiy1xalp35fh8g73j67r0w0g66jpcbc6971x9jbm7bvjy";
|
|
|
|
};
|
|
|
|
|
2020-06-28 01:45:28 +02:00
|
|
|
# Fix an incorrect platform test that misidentifies Darwin as Windows
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile.PL \
|
|
|
|
--replace '/win/i' '/MSWin32/'
|
|
|
|
'';
|
|
|
|
|
2021-02-24 20:53:45 +01:00
|
|
|
postFixup = ''
|
|
|
|
substituteInPlace $out/bin/rename \
|
|
|
|
--replace "#!${perl}/bin/perl" "#!${perl}/bin/perl -I $out/${perl.libPrefix}"
|
2018-02-04 14:32:09 +01:00
|
|
|
'';
|
|
|
|
|
2019-04-24 04:38:29 +02:00
|
|
|
doCheck = !stdenv.isDarwin;
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-02-04 14:32:09 +01:00
|
|
|
description = "Perl extension for renaming multiple files";
|
|
|
|
license = licenses.artistic1;
|
2018-02-12 16:30:27 +01:00
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
2018-02-04 14:32:09 +01:00
|
|
|
};
|
|
|
|
}
|