about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorArnold Krille <arnold@arnoldarts.de>2016-02-13 17:17:24 +0100
committerArnold Krille <arnold@arnoldarts.de>2016-02-13 17:52:54 +0100
commit243c336022e9f324b721630a163bfa7b01939fa9 (patch)
treef93ac4e1c56304f32cf97589d865da86101680e7 /pkgs/applications
parente63a3a6ad4a1a3fe7d5b7a2d07fd6ef8f8563bac (diff)
downloadnixlib-243c336022e9f324b721630a163bfa7b01939fa9.tar
nixlib-243c336022e9f324b721630a163bfa7b01939fa9.tar.gz
nixlib-243c336022e9f324b721630a163bfa7b01939fa9.tar.bz2
nixlib-243c336022e9f324b721630a163bfa7b01939fa9.tar.lz
nixlib-243c336022e9f324b721630a163bfa7b01939fa9.tar.xz
nixlib-243c336022e9f324b721630a163bfa7b01939fa9.tar.zst
nixlib-243c336022e9f324b721630a163bfa7b01939fa9.zip
rsync: Add rrsync as individual app
Extract the rsync source fetching into its own expression and use that
expression to fetch the same source for rsync and rrsync.

rrsync is just copied from the support folder of rsync, no configure or build
needed. Also none of the rsync patches are needed. Only the path to rsync needs
to be patched into rrsync.
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/networking/sync/rsync/default.nix6
-rw-r--r--pkgs/applications/networking/sync/rsync/rrsync.nix34
-rw-r--r--pkgs/applications/networking/sync/rsync/src.nix7
3 files changed, 42 insertions, 5 deletions
diff --git a/pkgs/applications/networking/sync/rsync/default.nix b/pkgs/applications/networking/sync/rsync/default.nix
index c13bb1b329df..6608e32e8bcb 100644
--- a/pkgs/applications/networking/sync/rsync/default.nix
+++ b/pkgs/applications/networking/sync/rsync/default.nix
@@ -9,11 +9,7 @@ stdenv.mkDerivation rec {
   name = "rsync-${version}";
   version = "3.1.2";
 
-  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 = import ./src.nix { inherit fetchurl version; };
 
   patchesSrc = fetchurl {
     # signed with key 0048 C8B0 26D4 C96F 0E58  9C2F 6C85 9FB1 4B96 A8C5
diff --git a/pkgs/applications/networking/sync/rsync/rrsync.nix b/pkgs/applications/networking/sync/rsync/rrsync.nix
new file mode 100644
index 000000000000..044a01993f9d
--- /dev/null
+++ b/pkgs/applications/networking/sync/rsync/rrsync.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchurl, perl, rsync }:
+
+stdenv.mkDerivation rec {
+  name = "rrsync-${version}";
+  version = "3.1.2";
+
+  src = import ./src.nix { inherit fetchurl version; };
+
+  buildInputs = [ rsync ];
+  nativeBuildInputs = [perl];
+
+  # Skip configure and build phases.
+  # We just want something from the support directory
+  configurePhase = "true";
+  dontBuild = true;
+
+  postPatch = ''
+    sed -i 's#/usr/bin/rsync#${rsync}/bin/rsync#' support/rrsync
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp support/rrsync $out/bin
+    chmod a+x $out/bin/rrsync
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = http://rsync.samba.org/;
+    description = "A helper to run rsync-only environments from ssh-logins.";
+    license = licenses.gpl3Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ simons ehmry ];
+  };
+}
diff --git a/pkgs/applications/networking/sync/rsync/src.nix b/pkgs/applications/networking/sync/rsync/src.nix
new file mode 100644
index 000000000000..f6896d2c5985
--- /dev/null
+++ b/pkgs/applications/networking/sync/rsync/src.nix
@@ -0,0 +1,7 @@
+{ version, fetchurl }:
+
+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";
+}
\ No newline at end of file