rsync: optional feature (disabled by default) to sync devices

I use this feature for doing snapshot backups, which is way faster
than copying a huge files tree.

The patch is semi-official, rsync-patches is maintained by rsync
upstream itself.
The patch doesn't affect any behaviour, it only adds 1 option
so it shouldn't affect you if you don't use it.

svn path=/nixpkgs/trunk/; revision=31659
This commit is contained in:
Peter Simons 2012-01-18 20:38:24 +00:00
parent 7b1be8e27d
commit 1e4a7842d2
2 changed files with 12 additions and 2 deletions

View File

@ -1,17 +1,26 @@
{ stdenv, fetchurl, perl
, enableACLs ? true, acl ? null
, enableCopyDevicesPatch ? false
}:
assert enableACLs -> acl != null;
stdenv.mkDerivation {
stdenv.mkDerivation rec {
name = "rsync-3.0.9";
src = fetchurl {
mainSrc = fetchurl {
url = http://rsync.samba.org/ftp/rsync/src/rsync-3.0.9.tar.gz;
sha256 = "01bw4klqsrlhh3i9lazd485sd9qx5djvnwa21lj2h3a9sn6hzw9h";
};
patchesSrc = fetchurl {
url = http://rsync.samba.org/ftp/rsync/rsync-patches-3.0.9.tar.gz;
sha256 = "0c1e9b56e99667dfc47641124460bac61a04c5d2ee89f575c6bc78c7a69005a9";
};
srcs = [mainSrc] ++ stdenv.lib.optional enableCopyDevicesPatch patchesSrc;
patches = [] ++ stdenv.lib.optional enableCopyDevicesPatch "./patches/copy-devices.diff";
buildInputs = stdenv.lib.optional enableACLs acl;
buildNativeInputs = [perl];

View File

@ -7359,6 +7359,7 @@ let
rsync = callPackage ../applications/networking/sync/rsync {
enableACLs = !(stdenv.isDarwin || stdenv.isSunOS);
enableCopyDevicesPatch = (getConfig ["rsync" "enableCopyDevicesPatch"] false);
};
rxvt = callPackage ../applications/misc/rxvt { };