2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, perl, rsync }:
|
2016-02-13 16:17:24 +00:00
|
|
|
|
2016-02-13 17:50:07 +00:00
|
|
|
let
|
2021-03-26 05:13:53 +00:00
|
|
|
base = import ./base.nix { inherit lib 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";
|
2021-01-15 13:21:58 +00:00
|
|
|
maintainers = [ lib.maintainers.kampfschlaefer ];
|
2016-02-13 16:17:24 +00:00
|
|
|
};
|
|
|
|
}
|