nixpkgs/pkgs/tools/filesystems/duff/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

41 lines
1.2 KiB
Nix

{ lib, stdenv, fetchFromGitHub, autoreconfHook, gettext }:
stdenv.mkDerivation {
pname = "duff";
# 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.
version = "2014-07-03";
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 lib; {
description = "Quickly find duplicate files";
longDescription = ''
Duff is a Unix command-line utility for quickly finding duplicates in
a given set of files.
'';
homepage = "https://duff.dreda.org/";
license = licenses.zlib;
platforms = platforms.all;
};
}