2022-09-30 11:47:45 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "jdupes";
|
2022-09-30 11:47:45 +00:00
|
|
|
version = "1.21.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jbruchon";
|
|
|
|
repo = "jdupes";
|
|
|
|
rev = "v${version}";
|
2022-09-30 11:47:45 +00:00
|
|
|
sha256 = "sha256-nDyRaV49bLVHlyqKJ7hf6OBWOLCfmHrTeHryK091c3w=";
|
2020-04-24 23:36:52 +00:00
|
|
|
# Unicode file names lead to different checksums on HFS+ vs. other
|
|
|
|
# filesystems because of unicode normalisation. The testdir
|
|
|
|
# directories have such files and will be removed.
|
2022-06-16 17:23:12 +00:00
|
|
|
postFetch = "rm -r $out/testdir";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "darwin-stack-size.patch";
|
|
|
|
url = "https://github.com/jbruchon/jdupes/commit/8f5b06109b44a9e4316f9445da3044590a6c63e2.patch";
|
|
|
|
sha256 = "0saq92v0mm5g979chr062psvwp3i3z23mgqrcliq4m07lvwc7i3s";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
dontConfigure = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
makeFlags = [
|
|
|
|
"PREFIX=${placeholder "out"}"
|
2021-01-15 22:18:51 +00:00
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
2020-04-24 23:36:52 +00:00
|
|
|
"ENABLE_DEDUPE=1"
|
|
|
|
"STATIC_DEDUPE_H=1"
|
2021-01-15 22:18:51 +00:00
|
|
|
] ++ lib.optionals stdenv.cc.isGNU [
|
2020-08-20 17:08:02 +00:00
|
|
|
"HARDEN=1"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
doCheck = false; # broken Makefile, the above also removes tests
|
|
|
|
|
|
|
|
postInstall = ''
|
2020-05-15 21:57:56 +00:00
|
|
|
install -Dm444 -t $out/share/doc/jdupes CHANGES LICENSE README.md
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A powerful duplicate file finder and an enhanced fork of 'fdupes'";
|
|
|
|
longDescription = ''
|
|
|
|
jdupes is a program for identifying and taking actions upon
|
|
|
|
duplicate files. This fork known as 'jdupes' is heavily modified
|
|
|
|
from and improved over the original.
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/jbruchon/jdupes";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ romildo ];
|
|
|
|
};
|
|
|
|
}
|