2022-12-02 08:20:57 +00:00
|
|
|
args @ {
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
llvmPackages_12, # Anything newer than 11
|
|
|
|
fetchzip,
|
|
|
|
which,
|
|
|
|
attr,
|
|
|
|
e2fsprogs,
|
|
|
|
curl,
|
|
|
|
libargon2,
|
|
|
|
librsync,
|
|
|
|
libthreadar,
|
|
|
|
gpgme,
|
|
|
|
libgcrypt,
|
|
|
|
openssl,
|
|
|
|
bzip2,
|
|
|
|
lz4,
|
|
|
|
lzo,
|
|
|
|
xz,
|
|
|
|
zlib,
|
|
|
|
CoreFoundation,
|
2020-09-25 04:45:31 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
let
|
2022-12-02 08:20:57 +00:00
|
|
|
# Fails to build with clang-11 on Darwin:
|
2022-11-27 09:42:12 +00:00
|
|
|
# error: exception specification of overriding function is more lax than base version
|
2022-12-02 08:20:57 +00:00
|
|
|
stdenv = if args.stdenv.isDarwin then llvmPackages_12.stdenv else args.stdenv;
|
2022-11-27 09:42:12 +00:00
|
|
|
in
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2022-08-21 13:32:41 +00:00
|
|
|
version = "2.7.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "dar";
|
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
src = fetchzip {
|
2020-04-24 23:36:52 +00:00
|
|
|
url = "mirror://sourceforge/dar/${pname}-${version}.tar.gz";
|
2022-12-02 08:20:57 +00:00
|
|
|
sha256 = "sha256-643hU28Vl0QaqdKoKdQ1Z/j5drE59/jw5xkVO/g+MSw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
nativeBuildInputs = [ which ];
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
buildInputs = [
|
2022-12-02 08:20:57 +00:00
|
|
|
curl
|
|
|
|
librsync
|
|
|
|
libthreadar
|
|
|
|
gpgme
|
|
|
|
libargon2
|
|
|
|
libgcrypt
|
|
|
|
openssl
|
|
|
|
bzip2
|
|
|
|
lz4
|
|
|
|
lzo
|
|
|
|
xz
|
|
|
|
zlib
|
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
2022-11-27 09:42:12 +00:00
|
|
|
attr
|
|
|
|
e2fsprogs
|
2022-12-02 08:20:57 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2022-11-27 09:42:12 +00:00
|
|
|
CoreFoundation
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--disable-birthtime"
|
|
|
|
"--disable-upx"
|
|
|
|
"--disable-dar-static"
|
|
|
|
"--disable-build-html"
|
|
|
|
"--enable-threadar"
|
|
|
|
];
|
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postInstall = ''
|
2020-09-25 04:45:31 +00:00
|
|
|
# Disable html help
|
|
|
|
rm -r "$out"/share/dar
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://dar.linux.free.fr";
|
|
|
|
description = "Disk ARchiver, allows backing up files into indexed archives";
|
2020-09-25 04:45:31 +00:00
|
|
|
maintainers = with maintainers; [ izorkin ];
|
2022-12-02 08:20:57 +00:00
|
|
|
license = licenses.gpl2Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|