2022-07-12 10:17:39 +00:00
|
|
|
{ stdenv, python3, rsync }:
|
2016-02-13 16:17:24 +00:00
|
|
|
|
2019-08-13 21:52:01 +00:00
|
|
|
stdenv.mkDerivation {
|
2021-07-12 10:51:53 +00:00
|
|
|
pname = "rrsync";
|
2022-08-20 03:51:09 +00:00
|
|
|
inherit (rsync) version src;
|
2016-02-13 16:17:24 +00:00
|
|
|
|
2022-07-11 19:30:48 +00:00
|
|
|
buildInputs = [
|
|
|
|
rsync
|
|
|
|
(python3.withPackages (pythonPackages: with pythonPackages; [ braceexpand ]))
|
|
|
|
];
|
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;
|
|
|
|
|
2022-05-27 13:39:03 +00:00
|
|
|
inherit (rsync) patches;
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2022-05-27 13:39:03 +00:00
|
|
|
meta = rsync.meta // {
|
2016-02-13 17:50:07 +00:00
|
|
|
description = "A helper to run rsync-only environments from ssh-logins";
|
2016-02-13 16:17:24 +00:00
|
|
|
};
|
|
|
|
}
|