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:17:24 +01:00
parent e63a3a6ad4
commit 243c336022
4 changed files with 43 additions and 5 deletions

View File

@ -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

View File

@ -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 ];
};
}

View File

@ -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";
}

View File

@ -13225,6 +13225,7 @@ let
enableACLs = !(stdenv.isDarwin || stdenv.isSunOS || stdenv.isFreeBSD);
enableCopyDevicesPatch = (config.rsync.enableCopyDevicesPatch or false);
};
rrsync = callPackage ../applications/networking/sync/rsync/rrsync.nix {};
rtl-sdr = callPackage ../applications/misc/rtl-sdr { };