diff options
author | aszlig <aszlig@redmoonstudios.org> | 2012-09-05 01:44:21 +0200 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2012-09-10 19:54:53 +0200 |
commit | de5c5467a682e9cc678fe8f8f6b22c850607ecda (patch) | |
tree | f606355bddc898bbdeeda9e8f82366778c96db7d /pkgs/tools | |
parent | 930d13e12ccb4924b534333bfcc6861961fbe46f (diff) | |
download | nixpkgs-de5c5467a682e9cc678fe8f8f6b22c850607ecda.tar nixpkgs-de5c5467a682e9cc678fe8f8f6b22c850607ecda.tar.gz nixpkgs-de5c5467a682e9cc678fe8f8f6b22c850607ecda.tar.bz2 nixpkgs-de5c5467a682e9cc678fe8f8f6b22c850607ecda.tar.lz nixpkgs-de5c5467a682e9cc678fe8f8f6b22c850607ecda.tar.xz nixpkgs-de5c5467a682e9cc678fe8f8f6b22c850607ecda.tar.zst nixpkgs-de5c5467a682e9cc678fe8f8f6b22c850607ecda.zip |
mmv: New package, version 1.01b from Debian.
This package as well as the patches are used from Debian, as the upstream version is no longer maintained, plus other distributions seem to use the Debian patched version aswell. And by looking at the patch from Debian, it seems reasonable, because it contains a _lot_ of fixes that accrued over time. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/misc/mmv/default.nix | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/pkgs/tools/misc/mmv/default.nix b/pkgs/tools/misc/mmv/default.nix new file mode 100644 index 00000000000..e6e7eb505bf --- /dev/null +++ b/pkgs/tools/misc/mmv/default.nix @@ -0,0 +1,46 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + name = "mmv-${version}"; + version = "1.01b"; + + src = fetchurl { + url = "http://ftp.debian.org/debian/pool/main/m/mmv/mmv_${version}.orig.tar.gz"; + sha256 = "0399c027ea1e51fd607266c1e33573866d4db89f64a74be8b4a1d2d1ff1fdeef"; + }; + + patches = [ + # Use Debian patched version, as upstream is no longer maintained and it + # contains a _lot_ of fixes. + (fetchurl { + url = "http://ftp.debian.org/debian/pool/main/m/mmv/mmv_${version}-15.diff.gz"; + sha256 = "9ad3e3d47510f816b4a18bae04ea75913588eec92248182f85dd09bc5ad2df13"; + }) + ]; + + postPatch = '' + sed -i \ + -e 's/^\s*LDFLAGS\s*=\s*-s\s*-N/LDFLAGS = -s/' \ + -e "s|/usr/bin|$out/bin|" \ + -e "s|/usr/man|$out/share/man|" \ + Makefile + ''; + + preInstall = '' + mkdir -p "$out/bin" "$out/share/man/man1" + ''; + + postInstall = '' + for variant in mcp mad mln + do + ln -s mmv "$out/bin/$variant" + ln -s mmv.1 "$out/share/man/man1/$variant.1" + done + ''; + + meta = { + homepage = "http://linux.maruhn.com/sec/mmv.html"; + description = "Utility for wildcard renaming, copying, etc"; + license = stdenv.lib.licenses.gpl2; + }; +} |