about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2016-02-21 10:00:43 +0100
committerVladimír Čunát <vcunat@gmail.com>2016-02-21 10:00:43 +0100
commit045164bdf8e32d7baa52c68ec0f5337c457e4820 (patch)
tree904c08026efedc613101114754fff852975978f2 /pkgs/applications
parent7e9a7a3b0fc059dba45db6554c8cdb56c0b74a8c (diff)
parentb4ac8fb39bbd1bd01c619fa7f19cb4dcd200cde2 (diff)
downloadnixlib-045164bdf8e32d7baa52c68ec0f5337c457e4820.tar
nixlib-045164bdf8e32d7baa52c68ec0f5337c457e4820.tar.gz
nixlib-045164bdf8e32d7baa52c68ec0f5337c457e4820.tar.bz2
nixlib-045164bdf8e32d7baa52c68ec0f5337c457e4820.tar.lz
nixlib-045164bdf8e32d7baa52c68ec0f5337c457e4820.tar.xz
nixlib-045164bdf8e32d7baa52c68ec0f5337c457e4820.tar.zst
nixlib-045164bdf8e32d7baa52c68ec0f5337c457e4820.zip
Merge #12973: add rrsync as an individual app
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/networking/sync/rsync/base.nix21
-rw-r--r--pkgs/applications/networking/sync/rsync/default.nix25
-rw-r--r--pkgs/applications/networking/sync/rsync/rrsync.nix33
3 files changed, 62 insertions, 17 deletions
diff --git a/pkgs/applications/networking/sync/rsync/base.nix b/pkgs/applications/networking/sync/rsync/base.nix
new file mode 100644
index 000000000000..86b90ea22ef2
--- /dev/null
+++ b/pkgs/applications/networking/sync/rsync/base.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchurl }:
+
+rec {
+  version = "3.2.1";
+  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 = "1hm1q04hz15509f0p9bflw4d6jzfvpm1d36dxjwihk1wzakn5ypc";
+  };
+  patches = fetchurl {
+    # signed with key 0048 C8B0 26D4 C96F 0E58  9C2F 6C85 9FB1 4B96 A8C5
+    url = "mirror://samba/rsync/rsync-patches-${version}.tar.gz";
+    sha256 = "09i3dcl37p22dp75vlnsvx7bm05ggafnrf1zwhf2kbij4ngvxvpd";
+  };
+
+  meta = with stdenv.lib; {
+    homepage = http://rsync.samba.org/;
+    license = licenses.gpl3Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/applications/networking/sync/rsync/default.nix b/pkgs/applications/networking/sync/rsync/default.nix
index c13bb1b329df..b65eb43351ef 100644
--- a/pkgs/applications/networking/sync/rsync/default.nix
+++ b/pkgs/applications/networking/sync/rsync/default.nix
@@ -5,21 +5,15 @@
 
 assert enableACLs -> acl != null;
 
+let
+  base = import ./base.nix { inherit stdenv fetchurl; };
+in
 stdenv.mkDerivation rec {
-  name = "rsync-${version}";
-  version = "3.1.2";
+  name = "rsync-${base.version}";
 
-  mainSrc = fetchurl {
-    # signed with key 0048 C8B0 26D4 C96F 0E58  9C2F 6C85 9FB1 4B96 A8C5
-    url = "mirror://samba/rsync/src/rsync-${version}.tar.gz";
-    sha256 = "1hm1q04hz15509f0p9bflw4d6jzfvpm1d36dxjwihk1wzakn5ypc";
-  };
+  mainSrc = base.src;
 
-  patchesSrc = fetchurl {
-    # signed with key 0048 C8B0 26D4 C96F 0E58  9C2F 6C85 9FB1 4B96 A8C5
-    url = "mirror://samba/rsync/rsync-patches-${version}.tar.gz";
-    sha256 = "09i3dcl37p22dp75vlnsvx7bm05ggafnrf1zwhf2kbij4ngvxvpd";
-  };
+  patchesSrc = base.patches;
 
   srcs = [mainSrc] ++ stdenv.lib.optional enableCopyDevicesPatch patchesSrc;
   patches = stdenv.lib.optional enableCopyDevicesPatch "./patches/copy-devices.diff";
@@ -29,11 +23,8 @@ stdenv.mkDerivation rec {
 
   configureFlags = "--with-nobody-group=nogroup";
 
-  meta = with stdenv.lib; {
-    homepage = http://rsync.samba.org/;
+  meta = base.meta // {
     description = "A fast incremental file transfer utility";
-    license = licenses.gpl3Plus;
-    platforms = platforms.unix;
-    maintainers = with maintainers; [ simons ehmry ];
+    maintainers = with stdenv.lib.maintainers; [ simons ehmry kampfschlaefer ];
   };
 }
diff --git a/pkgs/applications/networking/sync/rsync/rrsync.nix b/pkgs/applications/networking/sync/rsync/rrsync.nix
new file mode 100644
index 000000000000..7563b0ea1950
--- /dev/null
+++ b/pkgs/applications/networking/sync/rsync/rrsync.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchurl, perl, rsync }:
+
+let
+  base = import ./base.nix { inherit stdenv fetchurl; };
+in
+stdenv.mkDerivation rec {
+  name = "rrsync-${base.version}";
+
+  src = base.src;
+
+  buildInputs = [ rsync ];
+  nativeBuildInputs = [perl];
+
+  # Skip configure and build phases.
+  # We just want something from the support directory
+  configurePhase = "true";
+  dontBuild = true;
+
+  postPatch = ''
+    substituteInPlace support/rrsync --replace /usr/bin/rsync ${rsync}/bin/rsync
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp support/rrsync $out/bin
+    chmod a+x $out/bin/rrsync
+  '';
+
+  meta = base.meta // {
+    description = "A helper to run rsync-only environments from ssh-logins";
+    maintainers = [ stdenv.lib.maintainers.kampfschlaefer ];
+  };
+}