2018-07-21 01:44:44 +01:00
|
|
|
{ stdenv, fetchurl, perl, libiconv, zlib, popt
|
2019-02-03 15:30:18 +00:00
|
|
|
, enableACLs ? !(stdenv.isDarwin || stdenv.isSunOS || stdenv.isFreeBSD), acl ? null
|
2020-09-29 05:44:42 +01:00
|
|
|
, enableLZ4 ? true, lz4 ? null
|
|
|
|
, enableOpenSSL ? true, openssl ? null
|
|
|
|
, enableXXHash ? true, xxHash ? null
|
|
|
|
, enableZstd ? true, zstd ? null
|
2012-01-18 20:38:24 +00:00
|
|
|
, enableCopyDevicesPatch ? false
|
2009-02-03 22:13:35 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert enableACLs -> acl != null;
|
2020-09-29 05:44:42 +01:00
|
|
|
assert enableLZ4 -> lz4 != null;
|
|
|
|
assert enableOpenSSL -> openssl != null;
|
|
|
|
assert enableXXHash -> xxHash != null;
|
|
|
|
assert enableZstd -> zstd != null;
|
2005-11-22 22:39:09 +00:00
|
|
|
|
2016-02-13 17:50:07 +00:00
|
|
|
let
|
2018-07-21 01:44:44 +01:00
|
|
|
base = import ./base.nix { inherit stdenv fetchurl; };
|
2016-02-13 17:50:07 +00:00
|
|
|
in
|
2012-01-18 20:38:24 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2016-02-13 17:50:07 +00:00
|
|
|
name = "rsync-${base.version}";
|
2011-12-03 16:11:57 +00:00
|
|
|
|
2016-02-13 17:50:07 +00:00
|
|
|
mainSrc = base.src;
|
2009-02-03 22:13:35 +00:00
|
|
|
|
2018-01-29 12:39:35 +00:00
|
|
|
patchesSrc = base.upstreamPatchTarball;
|
2012-01-18 20:38:24 +00:00
|
|
|
|
|
|
|
srcs = [mainSrc] ++ stdenv.lib.optional enableCopyDevicesPatch patchesSrc;
|
2014-09-05 15:43:06 +01:00
|
|
|
patches = stdenv.lib.optional enableCopyDevicesPatch "./patches/copy-devices.diff";
|
2012-01-18 20:38:24 +00:00
|
|
|
|
2020-09-29 05:44:42 +01:00
|
|
|
buildInputs = [libiconv zlib popt]
|
|
|
|
++ stdenv.lib.optional enableACLs acl
|
|
|
|
++ stdenv.lib.optional enableZstd zstd
|
|
|
|
++ stdenv.lib.optional enableLZ4 lz4
|
|
|
|
++ stdenv.lib.optional enableOpenSSL openssl
|
|
|
|
++ stdenv.lib.optional enableXXHash xxHash;
|
2012-12-28 18:20:09 +00:00
|
|
|
nativeBuildInputs = [perl];
|
2009-02-03 22:13:35 +00:00
|
|
|
|
2017-07-19 11:49:46 +01:00
|
|
|
configureFlags = ["--with-nobody-group=nogroup"];
|
2014-05-05 13:55:34 +01:00
|
|
|
|
2016-02-13 17:50:07 +00:00
|
|
|
meta = base.meta // {
|
2009-02-03 22:13:35 +00:00
|
|
|
description = "A fast incremental file transfer utility";
|
2016-05-16 21:30:20 +01:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ peti ehmry kampfschlaefer ];
|
2009-02-03 22:13:35 +00:00
|
|
|
};
|
2005-11-22 22:39:09 +00:00
|
|
|
}
|