rsync/rrsync: less code duplication

- refactor the common parts all into the base.nix
- add myself as maintainer
This commit is contained in:
Arnold Krille
2016-02-20 11:59:50 +01:00
parent 243c336022
commit c3b4dd920b
4 changed files with 41 additions and 30 deletions
@@ -1,10 +1,12 @@
{ stdenv, fetchurl, perl, rsync }:
let
base = import ./base.nix { inherit stdenv fetchurl; };
in
stdenv.mkDerivation rec {
name = "rrsync-${version}";
version = "3.1.2";
name = "rrsync-${base.version}";
src = import ./src.nix { inherit fetchurl version; };
src = base.src;
buildInputs = [ rsync ];
nativeBuildInputs = [perl];
@@ -15,7 +17,7 @@ stdenv.mkDerivation rec {
dontBuild = true;
postPatch = ''
sed -i 's#/usr/bin/rsync#${rsync}/bin/rsync#' support/rrsync
substituteInPlace support/rrsync --replace /usr/bin/rsync ${rsync}/bin/rsync
'';
installPhase = ''
@@ -24,11 +26,7 @@ stdenv.mkDerivation rec {
chmod a+x $out/bin/rrsync
'';
meta = with stdenv.lib; {
homepage = http://rsync.samba.org/;
description = "A helper to run rsync-only environments from ssh-logins.";
license = licenses.gpl3Plus;
platforms = platforms.unix;
maintainers = with maintainers; [ simons ehmry ];
meta = base.meta // {
description = "A helper to run rsync-only environments from ssh-logins";
};
}