summary refs log tree commit diff
path: root/pkgs/tools/filesystems/duff/default.nix
blob: 1c4d068c4c13e48c098e3ad19efb13c292ccf438 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{ stdenv, fetchFromGitHub, autoreconfHook, gettext }:

# The last release (0.5.2) is more than 2 years old and lacks features like -D,
# limiting its usefulness. Upstream appears comatose if not dead.
let version = "2014-07-03"; in
stdenv.mkDerivation {
  name = "duff-${version}";

  src = fetchFromGitHub {
    sha256 = "1k2dx38pjzc5d624vw1cs5ipj9fprsm5vqv55agksc29m63lswnx";
    rev = "f26d4837768b062a3f98fa075c791d9c8a0bb75c";
    repo = "duff";
    owner = "elmindreda";
  };

  nativeBuildInputs = [ autoreconfHook gettext ];

  preAutoreconf = ''
    # 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
  '';

  enableParallelBuilding = true;

  meta = with stdenv.lib; {
    inherit version;
    description = "Quickly find duplicate files";
    longDescription = ''
      Duff is a Unix command-line utility for quickly finding duplicates in
      a given set of files.
    '';
    homepage = http://duff.dreda.org/;
    license = licenses.zlib;
    platforms = platforms.all;
    maintainers = with maintainers; [ nckx ];
  };
}