2019-06-16 20:59:06 +01:00
|
|
|
{ stdenv, fetchurl, 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
|
2019-08-13 22:52:01 +01:00
|
|
|
stdenv.mkDerivation {
|
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
|
|
|
|
2019-10-19 10:33:28 +01:00
|
|
|
buildInputs = [ rsync perl ];
|
2016-02-13 16:17:24 +00:00
|
|
|
|
|
|
|
# Skip configure and build phases.
|
|
|
|
# We just want something from the support directory
|
2019-06-19 16:36:06 +01:00
|
|
|
dontConfigure = true;
|
2016-02-13 16:17:24 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|