2017-12-09 12:09:28 +00:00
|
|
|
{ stdenv, fetchurl, fetchpatch, perl, rsync }:
|
2016-02-13 16:17:24 +00:00
|
|
|
|
2016-02-13 17:50:07 +00:00
|
|
|
let
|
2018-07-21 01:44:44 +01:00
|
|
|
base = import ./base.nix { inherit stdenv fetchurl; };
|
2016-02-13 17:50:07 +00:00
|
|
|
in
|
2016-02-13 16:17:24 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2016-02-13 17:50:07 +00:00
|
|
|
name = "rrsync-${base.version}";
|
2016-02-13 16:17:24 +00:00
|
|
|
|
2016-02-13 17:50:07 +00:00
|
|
|
src = base.src;
|
2016-02-13 16:17:24 +00:00
|
|
|
|
|
|
|
buildInputs = [ rsync ];
|
|
|
|
nativeBuildInputs = [perl];
|
|
|
|
|
|
|
|
# Skip configure and build phases.
|
|
|
|
# We just want something from the support directory
|
|
|
|
configurePhase = "true";
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
postPatch = ''
|
2016-02-13 17:50:07 +00:00
|
|
|
substituteInPlace support/rrsync --replace /usr/bin/rsync ${rsync}/bin/rsync
|
2016-02-13 16:17:24 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp support/rrsync $out/bin
|
|
|
|
chmod a+x $out/bin/rrsync
|
|
|
|
'';
|
|
|
|
|
2016-02-13 17:50:07 +00:00
|
|
|
meta = base.meta // {
|
|
|
|
description = "A helper to run rsync-only environments from ssh-logins";
|
2016-02-21 08:59:00 +00:00
|
|
|
maintainers = [ stdenv.lib.maintainers.kampfschlaefer ];
|
2016-02-13 16:17:24 +00:00
|
|
|
};
|
|
|
|
}
|