2012-09-05 00:44:21 +01:00
|
|
|
{ stdenv, fetchurl }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "mmv";
|
2012-09-05 00:44:21 +01:00
|
|
|
version = "1.01b";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2015-05-21 22:52:24 +01:00
|
|
|
url = "mirror://debian/pool/main/m/mmv/mmv_${version}.orig.tar.gz";
|
2012-09-05 00:44:21 +01:00
|
|
|
sha256 = "0399c027ea1e51fd607266c1e33573866d4db89f64a74be8b4a1d2d1ff1fdeef";
|
|
|
|
};
|
|
|
|
|
2016-08-04 08:47:05 +01:00
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2012-09-05 00:44:21 +01:00
|
|
|
patches = [
|
|
|
|
# Use Debian patched version, as upstream is no longer maintained and it
|
|
|
|
# contains a _lot_ of fixes.
|
|
|
|
(fetchurl {
|
2015-05-21 22:52:24 +01:00
|
|
|
url = "mirror://debian/pool/main/m/mmv/mmv_${version}-15.diff.gz";
|
2012-09-05 00:44:21 +01:00
|
|
|
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 = {
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = http://linux.maruhn.com/sec/mmv.html;
|
2012-09-05 00:44:21 +01:00
|
|
|
description = "Utility for wildcard renaming, copying, etc";
|
|
|
|
license = stdenv.lib.licenses.gpl2;
|
2016-08-02 18:50:55 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2012-09-05 00:44:21 +01:00
|
|
|
};
|
|
|
|
}
|