Files
nixpkgs/pkgs/by-name/du/duff/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

51 lines
1.2 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
gettext,
}:
stdenv.mkDerivation {
pname = "duff";
version = "2024-02-16";
src = fetchFromGitHub {
sha256 = "9lS4th+qeglsoA+1s45uEE2UGmlE3YtSy4/uGqWKU/k=";
rev = "c1baefa4f4d5cefbbbc7bfefc0c18356752c8a1b";
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
# src/main.c is utf8, not ascii
sed '/^XGETTEXT_OPTIONS =/ s,$, --from-code=utf-8,' -i po/Makevars
'';
enableParallelBuilding = true;
meta = with lib; {
description = "Quickly find duplicate files";
mainProgram = "duff";
longDescription = ''
Duff is a Unix command-line utility for quickly finding duplicates in
a given set of files.
'';
homepage = "https://github.com/elmindreda/duff";
license = licenses.zlib;
platforms = platforms.all;
};
}