rsync/rrsync: less code duplication
- refactor the common parts all into the base.nix - add myself as maintainer
This commit is contained in:
parent
243c336022
commit
c3b4dd920b
|
@ -0,0 +1,26 @@
|
||||||
|
{ stdenv, fetchurl }:
|
||||||
|
|
||||||
|
let
|
||||||
|
version = "3.2.1";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
version = version;
|
||||||
|
src = fetchurl {
|
||||||
|
# signed with key 0048 C8B0 26D4 C96F 0E58 9C2F 6C85 9FB1 4B96 A8C5
|
||||||
|
url = "mirror://samba/rsync/src/rsync-${version}.tar.gz";
|
||||||
|
sha256 = "1hm1q04hz15509f0p9bflw4d6jzfvpm1d36dxjwihk1wzakn5ypc";
|
||||||
|
};
|
||||||
|
patches = fetchurl {
|
||||||
|
# signed with key 0048 C8B0 26D4 C96F 0E58 9C2F 6C85 9FB1 4B96 A8C5
|
||||||
|
url = "mirror://samba/rsync/rsync-patches-${version}.tar.gz";
|
||||||
|
sha256 = "09i3dcl37p22dp75vlnsvx7bm05ggafnrf1zwhf2kbij4ngvxvpd";
|
||||||
|
};
|
||||||
|
|
||||||
|
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 kampfschlaefer ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -5,17 +5,15 @@
|
||||||
|
|
||||||
assert enableACLs -> acl != null;
|
assert enableACLs -> acl != null;
|
||||||
|
|
||||||
|
let
|
||||||
|
base = import ./base.nix { inherit stdenv fetchurl; };
|
||||||
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "rsync-${version}";
|
name = "rsync-${base.version}";
|
||||||
version = "3.1.2";
|
|
||||||
|
|
||||||
mainSrc = import ./src.nix { inherit fetchurl version; };
|
mainSrc = base.src;
|
||||||
|
|
||||||
patchesSrc = fetchurl {
|
patchesSrc = base.patches;
|
||||||
# signed with key 0048 C8B0 26D4 C96F 0E58 9C2F 6C85 9FB1 4B96 A8C5
|
|
||||||
url = "mirror://samba/rsync/rsync-patches-${version}.tar.gz";
|
|
||||||
sha256 = "09i3dcl37p22dp75vlnsvx7bm05ggafnrf1zwhf2kbij4ngvxvpd";
|
|
||||||
};
|
|
||||||
|
|
||||||
srcs = [mainSrc] ++ stdenv.lib.optional enableCopyDevicesPatch patchesSrc;
|
srcs = [mainSrc] ++ stdenv.lib.optional enableCopyDevicesPatch patchesSrc;
|
||||||
patches = stdenv.lib.optional enableCopyDevicesPatch "./patches/copy-devices.diff";
|
patches = stdenv.lib.optional enableCopyDevicesPatch "./patches/copy-devices.diff";
|
||||||
|
@ -25,11 +23,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
configureFlags = "--with-nobody-group=nogroup";
|
configureFlags = "--with-nobody-group=nogroup";
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = base.meta // {
|
||||||
homepage = http://rsync.samba.org/;
|
|
||||||
description = "A fast incremental file transfer utility";
|
description = "A fast incremental file transfer utility";
|
||||||
license = licenses.gpl3Plus;
|
|
||||||
platforms = platforms.unix;
|
|
||||||
maintainers = with maintainers; [ simons ehmry ];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
{ stdenv, fetchurl, perl, rsync }:
|
{ stdenv, fetchurl, perl, rsync }:
|
||||||
|
|
||||||
|
let
|
||||||
|
base = import ./base.nix { inherit stdenv fetchurl; };
|
||||||
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "rrsync-${version}";
|
name = "rrsync-${base.version}";
|
||||||
version = "3.1.2";
|
|
||||||
|
|
||||||
src = import ./src.nix { inherit fetchurl version; };
|
src = base.src;
|
||||||
|
|
||||||
buildInputs = [ rsync ];
|
buildInputs = [ rsync ];
|
||||||
nativeBuildInputs = [perl];
|
nativeBuildInputs = [perl];
|
||||||
|
@ -15,7 +17,7 @@ stdenv.mkDerivation rec {
|
||||||
dontBuild = true;
|
dontBuild = true;
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
sed -i 's#/usr/bin/rsync#${rsync}/bin/rsync#' support/rrsync
|
substituteInPlace support/rrsync --replace /usr/bin/rsync ${rsync}/bin/rsync
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
@ -24,11 +26,7 @@ stdenv.mkDerivation rec {
|
||||||
chmod a+x $out/bin/rrsync
|
chmod a+x $out/bin/rrsync
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = base.meta // {
|
||||||
homepage = http://rsync.samba.org/;
|
description = "A helper to run rsync-only environments from ssh-logins";
|
||||||
description = "A helper to run rsync-only environments from ssh-logins.";
|
|
||||||
license = licenses.gpl3Plus;
|
|
||||||
platforms = platforms.unix;
|
|
||||||
maintainers = with maintainers; [ simons ehmry ];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
{ version, fetchurl }:
|
|
||||||
|
|
||||||
fetchurl {
|
|
||||||
# signed with key 0048 C8B0 26D4 C96F 0E58 9C2F 6C85 9FB1 4B96 A8C5
|
|
||||||
url = "mirror://samba/rsync/src/rsync-${version}.tar.gz";
|
|
||||||
sha256 = "1hm1q04hz15509f0p9bflw4d6jzfvpm1d36dxjwihk1wzakn5ypc";
|
|
||||||
}
|
|
Loading…
Reference in New Issue