From 1e4a7842d24866ae767d8fe1b700ed4537807d17 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Wed, 18 Jan 2012 20:38:24 +0000 Subject: [PATCH] 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 --- pkgs/applications/networking/sync/rsync/default.nix | 13 +++++++++++-- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/sync/rsync/default.nix b/pkgs/applications/networking/sync/rsync/default.nix index 343895e0877b..09f85b9edfc8 100644 --- a/pkgs/applications/networking/sync/rsync/default.nix +++ b/pkgs/applications/networking/sync/rsync/default.nix @@ -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]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 66e852ee2c57..937a79e73b7b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { };