2021-07-22 08:22:59 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, fetchpatch
|
|
|
|
, perl
|
|
|
|
, libiconv
|
|
|
|
, zlib
|
|
|
|
, popt
|
|
|
|
, enableACLs ? lib.meta.availableOn stdenv.hostPlatform acl
|
|
|
|
, acl
|
|
|
|
, enableLZ4 ? true
|
|
|
|
, lz4
|
|
|
|
, enableOpenSSL ? true
|
|
|
|
, openssl
|
|
|
|
, enableXXHash ? true
|
|
|
|
, xxHash
|
|
|
|
, enableZstd ? true
|
|
|
|
, zstd
|
2012-01-18 20:38:24 +00:00
|
|
|
, enableCopyDevicesPatch ? false
|
2020-10-06 08:25:58 +00:00
|
|
|
, nixosTests
|
2009-02-03 22:13:35 +00:00
|
|
|
}:
|
|
|
|
|
2012-01-18 20:38:24 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-07-12 10:51:53 +00:00
|
|
|
pname = "rsync";
|
2022-05-27 13:39:03 +00:00
|
|
|
version = "3.2.4";
|
2011-12-03 16:11:57 +00:00
|
|
|
|
2022-05-27 13:39:03 +00:00
|
|
|
srcs = [
|
|
|
|
(fetchurl {
|
|
|
|
# signed with key 0048 C8B0 26D4 C96F 0E58 9C2F 6C85 9FB1 4B96 A8C5
|
|
|
|
url = "mirror://samba/rsync/src/rsync-${version}.tar.gz";
|
|
|
|
sha256 = "sha256-b3YYONCAUrC2V5z39nN9k+R/AfTaBMXSTTRHt/Kl+tE=";
|
|
|
|
})
|
|
|
|
] ++ lib.optional enableCopyDevicesPatch (fetchurl {
|
|
|
|
# signed with key 0048 C8B0 26D4 C96F 0E58 9C2F 6C85 9FB1 4B96 A8C5
|
|
|
|
url = "mirror://samba/rsync/rsync-patches-${version}.tar.gz";
|
|
|
|
sha256 = "1wj21v57v135n6fnm2m2dxmb9lhrrg62jgkggldp1gb7d6s4arny";
|
|
|
|
});
|
2009-02-03 22:13:35 +00:00
|
|
|
|
2022-05-27 09:00:35 +00:00
|
|
|
patches = lib.optional enableCopyDevicesPatch "./patches/copy-devices.diff";
|
2012-01-18 20:38:24 +00:00
|
|
|
|
2022-05-27 13:39:03 +00:00
|
|
|
nativeBuildInputs = [ perl ];
|
|
|
|
|
2021-07-22 08:22:59 +00:00
|
|
|
buildInputs = [ libiconv zlib popt ]
|
|
|
|
++ lib.optional enableACLs acl
|
|
|
|
++ lib.optional enableZstd zstd
|
|
|
|
++ lib.optional enableLZ4 lz4
|
|
|
|
++ lib.optional enableOpenSSL openssl
|
|
|
|
++ lib.optional enableXXHash xxHash;
|
2009-02-03 22:13:35 +00:00
|
|
|
|
2020-11-01 10:38:54 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-nobody-group=nogroup"
|
|
|
|
|
|
|
|
# disable the included zlib explicitly as it otherwise still compiles and
|
|
|
|
# links them even.
|
|
|
|
"--with-included-zlib=no"
|
2022-07-29 19:57:16 +00:00
|
|
|
];
|
2014-05-05 12:55:34 +00:00
|
|
|
|
2022-07-29 19:55:23 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2020-08-13 13:31:17 +00:00
|
|
|
passthru.tests = { inherit (nixosTests) rsyncd; };
|
|
|
|
|
2022-05-27 13:39:03 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Fast incremental file transfer utility";
|
|
|
|
homepage = "https://rsync.samba.org/";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.unix;
|
2021-10-14 08:59:33 +00:00
|
|
|
maintainers = with lib.maintainers; [ ehmry kampfschlaefer ];
|
2009-02-03 22:13:35 +00:00
|
|
|
};
|
2005-11-22 22:39:09 +00:00
|
|
|
}
|