lol
1{ stdenv, fetchurl, fetchpatch, perl, rsync }:
2
3let
4 base = import ./base.nix { inherit stdenv fetchurl fetchpatch; };
5in
6stdenv.mkDerivation rec {
7 name = "rrsync-${base.version}";
8
9 src = base.src;
10
11 buildInputs = [ rsync ];
12 nativeBuildInputs = [perl];
13
14 # Skip configure and build phases.
15 # We just want something from the support directory
16 configurePhase = "true";
17 dontBuild = true;
18
19 postPatch = ''
20 substituteInPlace support/rrsync --replace /usr/bin/rsync ${rsync}/bin/rsync
21 '';
22
23 installPhase = ''
24 mkdir -p $out/bin
25 cp support/rrsync $out/bin
26 chmod a+x $out/bin/rrsync
27 '';
28
29 meta = base.meta // {
30 description = "A helper to run rsync-only environments from ssh-logins";
31 maintainers = [ stdenv.lib.maintainers.kampfschlaefer ];
32 };
33}