anchor.diff:    nativeBuildInputs = [ autoreconfHook gettext ];
   
     preAutoreconf = ''
  -    # 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 \
  
positive.code: { stdenv, fetchFromGitHub, autoreconfHook, gettext }:
  
  let version = "0.5.2"; in
  stdenv.mkDerivation {
    name = "duff-${version}";
  
    src = fetchFromGitHub {
      sha256 = "0yfm910wjj6z0f0cg68x59ykf4ql5m49apzy8sra00f8kv4lpn53";
      rev = version;
      repo = "duff";
      owner = "elmindreda";
    };
  
negative.code:   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 ];
    };
  }
  