2021-02-17 12:37:24 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, python3
|
|
|
|
, sphinx
|
|
|
|
, acl
|
|
|
|
, curl
|
|
|
|
, fuse
|
|
|
|
, libselinux
|
|
|
|
, udev
|
|
|
|
, xz
|
|
|
|
, zstd
|
2018-06-25 01:17:01 +01:00
|
|
|
, fuseSupport ? true
|
|
|
|
, selinuxSupport ? true
|
|
|
|
, udevSupport ? true
|
2021-02-17 12:37:24 +00:00
|
|
|
, glibcLocales
|
|
|
|
, rsync
|
2018-06-25 00:49:52 +01:00
|
|
|
}:
|
2018-06-24 22:06:36 +01:00
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "casync";
|
2021-02-17 12:36:30 +00:00
|
|
|
version = "2-226-gbd8898e";
|
2018-06-24 22:06:36 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-02-17 12:36:30 +00:00
|
|
|
owner = "systemd";
|
|
|
|
repo = "casync";
|
|
|
|
rev = "bd8898ed92685e12022dd33a04c87786b5262344";
|
|
|
|
sha256 = "04ibglizjzyd7ih13q6m7ic78n0mzw9nfmb3zd1fcm9j62qlq11i";
|
2018-06-24 22:06:36 +01:00
|
|
|
};
|
|
|
|
|
2018-06-25 01:17:01 +01:00
|
|
|
buildInputs = [ acl curl xz zstd ]
|
2021-02-17 12:37:24 +00:00
|
|
|
++ lib.optionals (fuseSupport) [ fuse ]
|
|
|
|
++ lib.optionals (selinuxSupport) [ libselinux ]
|
|
|
|
++ lib.optionals (udevSupport) [ udev ];
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ meson ninja pkg-config python3 sphinx ];
|
2018-06-25 00:49:52 +01:00
|
|
|
checkInputs = [ glibcLocales rsync ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
for f in test/test-*.sh.in; do
|
|
|
|
patchShebangs $f
|
|
|
|
done
|
|
|
|
patchShebangs test/http-server.py
|
|
|
|
'';
|
2018-06-24 22:06:36 +01:00
|
|
|
|
|
|
|
PKG_CONFIG_UDEV_UDEVDIR = "lib/udev";
|
2021-01-15 13:21:58 +00:00
|
|
|
mesonFlags = lib.optionals (!fuseSupport) [ "-Dfuse=false" ]
|
2021-02-17 12:37:24 +00:00
|
|
|
++ lib.optionals (!udevSupport) [ "-Dudev=false" ]
|
|
|
|
++ lib.optionals (!selinuxSupport) [ "-Dselinux=false" ];
|
2018-06-24 22:06:36 +01:00
|
|
|
|
2018-06-25 00:49:52 +01:00
|
|
|
doCheck = true;
|
|
|
|
preCheck = ''
|
|
|
|
export LC_ALL="en_US.utf-8"
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-06-24 22:06:36 +01:00
|
|
|
description = "Content-Addressable Data Synchronizer";
|
2021-02-17 12:37:24 +00:00
|
|
|
homepage = "https://github.com/systemd/casync";
|
2021-02-17 15:59:18 +00:00
|
|
|
license = licenses.lgpl21Plus;
|
2021-02-17 12:37:24 +00:00
|
|
|
platforms = platforms.linux;
|
2018-06-24 22:06:36 +01:00
|
|
|
maintainers = with maintainers; [ flokli ];
|
|
|
|
};
|
|
|
|
}
|