lol
1{
2 stdenv,
3 python3,
4 rsync,
5}:
6
7stdenv.mkDerivation {
8 pname = "rrsync";
9 inherit (rsync) version src;
10
11 buildInputs = [
12 rsync
13 (python3.withPackages (pythonPackages: with pythonPackages; [ braceexpand ]))
14 ];
15 # Skip configure and build phases.
16 # We just want something from the support directory
17 dontConfigure = true;
18 dontBuild = true;
19
20 inherit (rsync) patches;
21
22 postPatch = ''
23 substituteInPlace support/rrsync --replace /usr/bin/rsync ${rsync}/bin/rsync
24 '';
25
26 installPhase = ''
27 mkdir -p $out/bin
28 cp support/rrsync $out/bin
29 chmod a+x $out/bin/rrsync
30 '';
31
32 meta = rsync.meta // {
33 description = "Helper to run rsync-only environments from ssh-logins";
34 mainProgram = "rrsync";
35 };
36}