1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-05 03:53:41 +00:00
nixpkgs/pkgs/tools/filesystems/file-rename/default.nix

33 lines
844 B
Nix
Raw Normal View History

2018-02-04 13:32:09 +00:00
{ stdenv, fetchurl, perlPackages, makeWrapper }:
perlPackages.buildPerlPackage {
pname = "File-Rename";
version = "0.20";
2018-02-04 13:32:09 +00:00
src = fetchurl {
url = "mirror://cpan/authors/id/R/RM/RMBARKER/File-Rename-0.20.tar.gz";
2018-02-04 13:32:09 +00:00
sha256 = "1cf6xx2hiy1xalp35fh8g73j67r0w0g66jpcbc6971x9jbm7bvjy";
};
nativeBuildInputs = [ makeWrapper ];
# Fix an incorrect platform test that misidentifies Darwin as Windows
postPatch = ''
substituteInPlace Makefile.PL \
--replace '/win/i' '/MSWin32/'
'';
2018-02-04 13:32:09 +00:00
postInstall = ''
wrapProgram $out/bin/rename \
--prefix PERL5LIB : $out/${perlPackages.perl.libPrefix}
2018-02-04 13:32:09 +00:00
'';
doCheck = !stdenv.isDarwin;
2018-02-04 13:32:09 +00:00
meta = with stdenv.lib; {
description = "Perl extension for renaming multiple files";
license = licenses.artistic1;
2018-02-12 15:30:27 +00:00
maintainers = with maintainers; [ peterhoeg ];
2018-02-04 13:32:09 +00:00
};
}