3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/sync/rsync/rrsync.nix
2022-06-05 09:00:03 -05:00

30 lines
649 B
Nix

{ lib, stdenv, fetchurl, perl, rsync, fetchpatch }:
stdenv.mkDerivation {
pname = "rrsync";
inherit (rsync) version srcs;
buildInputs = [ rsync perl ];
# Skip configure and build phases.
# We just want something from the support directory
dontConfigure = true;
dontBuild = true;
inherit (rsync) patches;
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 = rsync.meta // {
description = "A helper to run rsync-only environments from ssh-logins";
};
}