nixpkgs/pkgs/applications/networking/sync/rsync/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

70 lines
1.7 KiB
Nix
Raw Normal View History

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
, enableCopyDevicesPatch ? false
2020-10-06 08:25:58 +00:00
, nixosTests
}:
stdenv.mkDerivation rec {
pname = "rsync";
2022-05-27 13:39:03 +00:00
version = "3.2.4";
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";
});
patches = lib.optional enableCopyDevicesPatch "./patches/copy-devices.diff";
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;
configureFlags = [
"--with-nobody-group=nogroup"
# disable the included zlib explicitly as it otherwise still compiles and
# links them even.
"--with-included-zlib=no"
];
enableParallelBuilding = true;
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;
maintainers = with lib.maintainers; [ ehmry kampfschlaefer ];
};
}