1{
2 lib,
3 stdenv,
4 fetchzip,
5 which,
6 attr,
7 e2fsprogs,
8 curl,
9 libargon2,
10 librsync,
11 libthreadar,
12 gpgme,
13 libgcrypt,
14 openssl,
15 bzip2,
16 lz4,
17 lzo,
18 xz,
19 zlib,
20 zstd,
21 CoreFoundation,
22}:
23
24stdenv.mkDerivation rec {
25 version = "2.7.13";
26 pname = "dar";
27
28 src = fetchzip {
29 url = "mirror://sourceforge/dar/${pname}-${version}.tar.gz";
30 sha256 = "sha256-d88BwbovhbAn72y5pVd4No+hVydXbtZYHZpdtpo4RGY=";
31 };
32
33 outputs = [ "out" "dev" ];
34
35 nativeBuildInputs = [ which ];
36
37 buildInputs = [
38 curl
39 librsync
40 libthreadar
41 gpgme
42 libargon2
43 libgcrypt
44 openssl
45 bzip2
46 lz4
47 lzo
48 xz
49 zlib
50 zstd
51 ] ++ lib.optionals stdenv.isLinux [
52 attr
53 e2fsprogs
54 ] ++ lib.optionals stdenv.isDarwin [
55 CoreFoundation
56 ];
57
58 configureFlags = [
59 "--disable-birthtime"
60 "--disable-upx"
61 "--disable-dar-static"
62 "--disable-build-html"
63 "--enable-threadar"
64 ];
65
66 hardeningDisable = [ "format" ];
67
68 enableParallelBuilding = true;
69
70 postInstall = ''
71 # Disable html help
72 rm -r "$out"/share/dar
73 '';
74
75 meta = with lib; {
76 homepage = "http://dar.linux.free.fr";
77 description = "Disk ARchiver, allows backing up files into indexed archives";
78 maintainers = with maintainers; [ izorkin ];
79 license = licenses.gpl2Only;
80 platforms = platforms.unix;
81 };
82}