summary refs log tree commit diff
path: root/pkgs/applications/networking/sync/rsync
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-08-04 10:43:07 +0000
committerAlyssa Ross <hi@alyssa.is>2021-08-04 10:43:07 +0000
commit62614cbef7da005c1eda8c9400160f6bcd6546b8 (patch)
treec2630f69080637987b68acb1ee8676d2681fe304 /pkgs/applications/networking/sync/rsync
parentd9c82ed3044c72cecf01c6ea042489d30914577c (diff)
parente24069138dfec3ef94f211f1da005bb5395adc11 (diff)
downloadnixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.gz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.bz2
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.lz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.xz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.zst
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.zip
Merge branch 'nixpkgs-update' into master
Diffstat (limited to 'pkgs/applications/networking/sync/rsync')
-rw-r--r--pkgs/applications/networking/sync/rsync/base.nix10
-rw-r--r--pkgs/applications/networking/sync/rsync/default.nix46
-rw-r--r--pkgs/applications/networking/sync/rsync/rrsync.nix6
3 files changed, 46 insertions, 16 deletions
diff --git a/pkgs/applications/networking/sync/rsync/base.nix b/pkgs/applications/networking/sync/rsync/base.nix
index a0522dfe820..3479458088e 100644
--- a/pkgs/applications/networking/sync/rsync/base.nix
+++ b/pkgs/applications/networking/sync/rsync/base.nix
@@ -1,19 +1,19 @@
-{ stdenv, fetchurl }:
+{ lib, fetchurl }:
 
 rec {
-  version = "3.1.3";
+  version = "3.2.3";
   src = fetchurl {
     # signed with key 0048 C8B0 26D4 C96F 0E58  9C2F 6C85 9FB1 4B96 A8C5
     url = "mirror://samba/rsync/src/rsync-${version}.tar.gz";
-    sha256 = "1h0011dj6jgqpgribir4anljjv7bbrdcs8g91pbsmzf5zr75bk2m";
+    sha256 = "03p5dha9g9krq61mdbcrjkpz5nglri0009ks2vs9k97f9i83rk5y";
   };
   upstreamPatchTarball = fetchurl {
     # signed with key 0048 C8B0 26D4 C96F 0E58  9C2F 6C85 9FB1 4B96 A8C5
     url = "mirror://samba/rsync/rsync-patches-${version}.tar.gz";
-    sha256 = "167vk463bb3xl9c4gsbxms111dk1ip7pq8y361xc0xfa427q9hhd";
+    sha256 = "1wj21v57v135n6fnmlm2dxmb9lhrrg62jgkggldp1gb7d6s4arny";
   };
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Fast incremental file transfer utility";
     homepage = "https://rsync.samba.org/";
     license = licenses.gpl3Plus;
diff --git a/pkgs/applications/networking/sync/rsync/default.nix b/pkgs/applications/networking/sync/rsync/default.nix
index 4045c1f0fc5..54417e6ef4b 100644
--- a/pkgs/applications/networking/sync/rsync/default.nix
+++ b/pkgs/applications/networking/sync/rsync/default.nix
@@ -1,12 +1,21 @@
-{ stdenv, fetchurl, perl, libiconv, zlib, popt
-, enableACLs ? !(stdenv.isDarwin || stdenv.isSunOS || stdenv.isFreeBSD), acl ? null
+{ lib, stdenv, fetchurl, perl, libiconv, zlib, popt
+, enableACLs ? lib.meta.availableOn stdenv.hostPlatform acl, acl ? null
+, enableLZ4 ? true, lz4 ? null
+, enableOpenSSL ? true, openssl ? null
+, enableXXHash ? true, xxHash ? null
+, enableZstd ? true, zstd ? null
 , enableCopyDevicesPatch ? false
+, nixosTests
 }:
 
 assert enableACLs -> acl != null;
+assert enableLZ4 -> lz4 != null;
+assert enableOpenSSL -> openssl != null;
+assert enableXXHash -> xxHash != null;
+assert enableZstd -> zstd != null;
 
 let
-  base = import ./base.nix { inherit stdenv fetchurl; };
+  base = import ./base.nix { inherit lib fetchurl; };
 in
 stdenv.mkDerivation rec {
   name = "rsync-${base.version}";
@@ -15,16 +24,37 @@ stdenv.mkDerivation rec {
 
   patchesSrc = base.upstreamPatchTarball;
 
-  srcs = [mainSrc] ++ stdenv.lib.optional enableCopyDevicesPatch patchesSrc;
-  patches = stdenv.lib.optional enableCopyDevicesPatch "./patches/copy-devices.diff";
+  srcs = [mainSrc] ++ lib.optional enableCopyDevicesPatch patchesSrc;
+  patches = lib.optional enableCopyDevicesPatch "./patches/copy-devices.diff";
 
-  buildInputs = [libiconv zlib popt] ++ stdenv.lib.optional enableACLs acl;
+  buildInputs = [libiconv zlib popt]
+                ++ lib.optional enableACLs acl
+                ++ lib.optional enableZstd zstd
+                ++ lib.optional enableLZ4 lz4
+                ++ lib.optional enableOpenSSL openssl
+                ++ lib.optional enableXXHash xxHash;
   nativeBuildInputs = [perl];
 
-  configureFlags = ["--with-nobody-group=nogroup"];
+  configureFlags = [
+    "--with-nobody-group=nogroup"
+
+    # disable the included zlib explicitly as it otherwise still compiles and
+    # links them even.
+    "--with-included-zlib=no"
+  ]
+    # Work around issue with cross-compilation:
+    #     configure.sh: error: cannot run test program while cross compiling
+    # Remove once 3.2.4 or more recent is released.
+    # The following PR should fix the cross-compilation issue.
+    # Test using `nix-build -A pkgsCross.aarch64-multiplatform.rsync`.
+    # https://github.com/WayneD/rsync/commit/b7fab6f285ff0ff3816b109a8c3131b6ded0b484
+    ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "--enable-simd=no"
+  ;
+
+  passthru.tests = { inherit (nixosTests) rsyncd; };
 
   meta = base.meta // {
     description = "A fast incremental file transfer utility";
-    maintainers = with stdenv.lib.maintainers; [ peti ehmry kampfschlaefer ];
+    maintainers = with lib.maintainers; [ peti ehmry kampfschlaefer ];
   };
 }
diff --git a/pkgs/applications/networking/sync/rsync/rrsync.nix b/pkgs/applications/networking/sync/rsync/rrsync.nix
index 19be478b0f1..83eb4658d2f 100644
--- a/pkgs/applications/networking/sync/rsync/rrsync.nix
+++ b/pkgs/applications/networking/sync/rsync/rrsync.nix
@@ -1,7 +1,7 @@
-{ stdenv, fetchurl, perl, rsync }:
+{ lib, stdenv, fetchurl, perl, rsync }:
 
 let
-  base = import ./base.nix { inherit stdenv fetchurl; };
+  base = import ./base.nix { inherit lib fetchurl; };
 in
 stdenv.mkDerivation {
   name = "rrsync-${base.version}";
@@ -27,6 +27,6 @@ stdenv.mkDerivation {
 
   meta = base.meta // {
     description = "A helper to run rsync-only environments from ssh-logins";
-    maintainers = [ stdenv.lib.maintainers.kampfschlaefer ];
+    maintainers = [ lib.maintainers.kampfschlaefer ];
   };
 }