2022-11-27 09:42:12 +00:00
|
|
|
{ lib, gccStdenv, fetchurl
|
2022-01-19 23:45:15 +00:00
|
|
|
, which
|
2020-09-25 04:45:31 +00:00
|
|
|
, attr, e2fsprogs
|
2022-01-19 23:45:15 +00:00
|
|
|
, curl, libargon2, librsync, libthreadar
|
2020-09-25 04:45:31 +00:00
|
|
|
, gpgme, libgcrypt, openssl
|
2022-01-19 23:45:15 +00:00
|
|
|
, bzip2, lz4, lzo, xz, zlib
|
2022-11-27 09:42:12 +00:00
|
|
|
, CoreFoundation
|
2020-09-25 04:45:31 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
with lib;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
let
|
|
|
|
# Fails to build with clang on Darwin:
|
|
|
|
# error: exception specification of overriding function is more lax than base version
|
|
|
|
stdenv = gccStdenv;
|
|
|
|
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";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/dar/${pname}-${version}.tar.gz";
|
2022-08-21 13:32:41 +00:00
|
|
|
sha256 = "sha256-wD4vUu/WWi8Ee2C77aJGDLUlFl4b4y8RC2Dgzs4/LMk=";
|
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 = [
|
|
|
|
curl librsync libthreadar
|
2022-01-19 23:45:15 +00:00
|
|
|
gpgme libargon2 libgcrypt openssl
|
|
|
|
bzip2 lz4 lzo xz zlib
|
2022-11-27 09:42:12 +00:00
|
|
|
] ++ optionals stdenv.isLinux [
|
|
|
|
attr
|
|
|
|
e2fsprogs
|
|
|
|
] ++ optionals stdenv.isDarwin [
|
|
|
|
CoreFoundation
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--disable-birthtime"
|
|
|
|
"--disable-upx"
|
|
|
|
"--disable-dar-static"
|
|
|
|
"--disable-build-html"
|
|
|
|
"--enable-threadar"
|
|
|
|
];
|
|
|
|
|
|
|
|
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
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
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 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|