2016-02-13 16:17:24 +00:00
|
|
|
{ stdenv, fetchurl, perl, rsync }:
|
|
|
|
|
2016-02-13 17:50:07 +00:00
|
|
|
let
|
|
|
|
base = import ./base.nix { inherit stdenv fetchurl; };
|
|
|
|
in
|
2016-02-13 16:17:24 +00:00
|
|
|
stdenv.mkDerivation rec {
|
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
|
|
|
|
|
|
|
buildInputs = [ rsync ];
|
|
|
|
nativeBuildInputs = [perl];
|
|
|
|
|
|
|
|
# Skip configure and build phases.
|
|
|
|
# We just want something from the support directory
|
|
|
|
configurePhase = "true";
|
|
|
|
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";
|
2016-02-21 08:59:00 +00:00
|
|
|
maintainers = [ stdenv.lib.maintainers.kampfschlaefer ];
|
2016-02-13 16:17:24 +00:00
|
|
|
};
|
|
|
|
}
|