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.
This commit is contained in:
Arnold Krille
2016-02-13 17:52:54 +01:00
parent e63a3a6ad4
commit 243c336022
4 changed files with 43 additions and 5 deletions
@@ -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 ];
};
}