summaryrefslogtreecommitdiffstats
path: root/pkgs/tools/filesystems/duff
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>2014-12-06 00:10:08 +0100
committerTobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>2014-12-06 00:10:08 +0100
commit51ccf09ba295fb11710526daf33a1bc1e013433d (patch)
tree7c702fb8f2c76d3c46620ab902f4993663d8ef0e /pkgs/tools/filesystems/duff
parent8297e09d78d30714f77230fcce22dfa0aaa5aa2a (diff)
Add duff: find duplicate files from the command line
Diffstat (limited to 'pkgs/tools/filesystems/duff')
-rw-r--r--pkgs/tools/filesystems/duff/default.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/tools/filesystems/duff/default.nix b/pkgs/tools/filesystems/duff/default.nix
new file mode 100644
index 000000000000..d0667da7f60e
--- /dev/null
+++ b/pkgs/tools/filesystems/duff/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchurl, autoconf, automake, gettext }:
+
+stdenv.mkDerivation rec {
+ name = "duff-${version}";
+ version = "0.5.2";
+
+ src = fetchurl {
+ url = "https://github.com/elmindreda/duff/archive/${version}.tar.gz";
+ sha256 = "149dd80f9758085ed199c37aa32ad869409fa5e2c8da8a51294bd64ca886e058";
+ };
+
+ buildInputs = [ autoconf automake gettext ];
+
+ preConfigure = ''
+ # duff is currently badly packaged, requiring us to do extra work here that
+ # should be done upstream. If that is ever fixed, this entire phase can be
+ # removed along with all buildInputs.
+
+ # gettexttize rightly refuses to run non-interactively:
+ cp ${gettext}/bin/gettextize .
+ substituteInPlace gettextize \
+ --replace "read dummy" "echo (Automatically acknowledged)"
+ ./gettextize
+ sed 's@po/Makefile.in\( .*\)po/Makefile.in@po/Makefile.in \1@' \
+ -i configure.ac
+ autoreconf -i
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Quickly find duplicate files.";
+ homepage = http://duff.dreda.org/;
+ license = with licenses; zlib;
+ longDescription = ''
+ Duff is a Unix command-line utility for quickly finding duplicates in
+ a given set of files.
+ '';
+ maintainers = with maintainers; [ nckx ];
+ platforms = with platforms; all;
+ };
+}