3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/sync/rsync/rrsync.nix

33 lines
730 B
Nix
Raw Normal View History

{ stdenv, fetchurl, perl, rsync }:
let
base = import ./base.nix { inherit stdenv fetchurl; };
in
2019-08-13 22:52:01 +01:00
stdenv.mkDerivation {
name = "rrsync-${base.version}";
src = base.src;
buildInputs = [ rsync perl ];
# Skip configure and build phases.
# We just want something from the support directory
2019-06-19 16:36:06 +01:00
dontConfigure = true;
dontBuild = true;
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 = base.meta // {
description = "A helper to run rsync-only environments from ssh-logins";
maintainers = [ stdenv.lib.maintainers.kampfschlaefer ];
};
}