4 , updateAutotoolsGnuConfigScriptsHook
9 , enableACLs ? lib.meta.availableOn stdenv.hostPlatform acl
13 , enableOpenSSL ? true
22 stdenv.mkDerivation rec {
27 # signed with key 0048 C8B0 26D4 C96F 0E58 9C2F 6C85 9FB1 4B96 A8C5
28 url = "mirror://samba/rsync/src/rsync-${version}.tar.gz";
29 hash = "sha256-c5nppnCMMtZ4pypjIZ6W8jvgviM25Q/RNISY0HBB35A=";
32 nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook perl ];
35 # https://github.com/WayneD/rsync/pull/558
36 ./configure.ac-fix-failing-IPv6-check.patch
39 buildInputs = [ libiconv zlib popt ]
40 ++ lib.optional enableACLs acl
41 ++ lib.optional enableZstd zstd
42 ++ lib.optional enableLZ4 lz4
43 ++ lib.optional enableOpenSSL openssl
44 ++ lib.optional enableXXHash xxHash;
47 (lib.enableFeature enableLZ4 "lz4")
48 (lib.enableFeature enableOpenSSL "openssl")
49 (lib.enableFeature enableXXHash "xxhash")
50 (lib.enableFeature enableZstd "zstd")
51 "--with-nobody-group=nogroup"
53 # disable the included zlib explicitly as it otherwise still compiles and
55 "--with-included-zlib=no"
56 ] ++ lib.optionals (stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isx86_64) [
57 # fix `multiversioning needs 'ifunc' which is not supported on this target` error
61 enableParallelBuilding = true;
63 passthru.tests = { inherit (nixosTests) rsyncd; };
66 description = "Fast incremental file transfer utility";
67 homepage = "https://rsync.samba.org/";
68 license = licenses.gpl3Plus;
69 mainProgram = "rsync";
70 maintainers = with lib.maintainers; [ ehmry kampfschlaefer ivan ];
71 platforms = platforms.unix;