2021-07-17 23:08:00 +00:00
|
|
|
{ lib, stdenv, fetchurl, perl, rsync, fetchpatch }:
|
2016-02-13 16:17:24 +00:00
|
|
|
|
2016-02-13 17:50:07 +00:00
|
|
|
let
|
2021-07-17 23:08:00 +00:00
|
|
|
base = import ./base.nix { inherit lib fetchurl fetchpatch; };
|
2016-02-13 17:50:07 +00:00
|
|
|
in
|
2019-08-13 21:52:01 +00:00
|
|
|
stdenv.mkDerivation {
|
2021-07-12 10:51:53 +00:00
|
|
|
pname = "rrsync";
|
|
|
|
version = 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 09:33:28 +00: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 15:36:06 +00:00
|
|
|
dontConfigure = true;
|
2016-02-13 16:17:24 +00:00
|
|
|
dontBuild = true;
|
|
|
|
|
2021-07-17 23:08:00 +00:00
|
|
|
patches = base.extraPatches;
|
|
|
|
|
2016-02-13 16:17:24 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|