diff --git a/pkgs/applications/networking/sync/rsync/default.nix b/pkgs/applications/networking/sync/rsync/default.nix index c13bb1b329d..6608e32e8bc 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 00000000000..044a01993f9 --- /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 00000000000..f6896d2c598 --- /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 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5e8312764dd..ebbd1edce0d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { };