nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromCodeberg,
5 libjodycode,
6}:
7
8stdenv.mkDerivation (finalAttrs: {
9 pname = "jdupes";
10 version = "1.31.1";
11
12 src = fetchFromCodeberg {
13 owner = "jbruchon";
14 repo = "jdupes";
15 rev = "v${finalAttrs.version}";
16 hash = "sha256-I1DtJokp43K9nZt73od4esK705nosIWEHLw4lydufbE=";
17 # Unicode file names lead to different checksums on HFS+ vs. other
18 # filesystems because of unicode normalisation. The testdir
19 # directories have such files and will be removed.
20 postFetch = "rm -r $out/testdir";
21 };
22
23 buildInputs = [ libjodycode ];
24
25 dontConfigure = true;
26
27 makeFlags = [
28 "PREFIX=${placeholder "out"}"
29 # don't link with ../libjodycode
30 "IGNORE_NEARBY_JC=1"
31 ]
32 ++ lib.optionals stdenv.hostPlatform.isLinux [
33 "ENABLE_DEDUPE=1"
34 "STATIC_DEDUPE_H=1"
35 ]
36 ++ lib.optionals stdenv.cc.isGNU [ "HARDEN=1" ];
37
38 enableParallelBuilding = true;
39
40 doCheck = false; # broken Makefile, the above also removes tests
41
42 postInstall = ''
43 install -Dm444 -t $out/share/doc/jdupes CHANGES.txt LICENSE.txt README.md
44 '';
45
46 meta = {
47 description = "Powerful duplicate file finder and an enhanced fork of 'fdupes'";
48 longDescription = ''
49 jdupes is a program for identifying and taking actions upon
50 duplicate files. This fork known as 'jdupes' is heavily modified
51 from and improved over the original.
52 '';
53 homepage = "https://codeberg.org/jbruchon/jdupes";
54 license = lib.licenses.mit;
55 maintainers = [ ];
56 mainProgram = "jdupes";
57 };
58})