2018-06-25 00:49:52 +01:00
|
|
|
{ stdenv, fetchFromGitHub, fetchpatch
|
|
|
|
, meson, ninja, pkgconfig, sphinx
|
|
|
|
, acl, curl, fuse, libselinux, udev, xz, zstd
|
2018-06-25 01:17:01 +01:00
|
|
|
, fuseSupport ? true
|
|
|
|
, selinuxSupport ? true
|
|
|
|
, udevSupport ? true
|
2018-06-25 00:49:52 +01:00
|
|
|
, glibcLocales, rsync
|
|
|
|
}:
|
2018-06-24 22:06:36 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "casync-${version}";
|
|
|
|
version = "2-152-ge4a3c5e";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "systemd";
|
|
|
|
repo = "casync";
|
|
|
|
rev = "e4a3c5efc8f11e0e99f8cc97bd417665d92b40a9";
|
|
|
|
sha256 = "0zx6zvj5a6rr3w9s207rvpfw7gwssiqmp1p3c75bsirmz4nmsdf0";
|
|
|
|
};
|
|
|
|
|
2018-06-25 01:17:01 +01:00
|
|
|
buildInputs = [ acl curl xz zstd ]
|
|
|
|
++ stdenv.lib.optionals (fuseSupport) [ fuse ]
|
|
|
|
++ stdenv.lib.optionals (selinuxSupport) [ libselinux ]
|
|
|
|
++ stdenv.lib.optionals (udevSupport) [ udev ];
|
2018-06-24 22:06:36 +01:00
|
|
|
nativeBuildInputs = [ meson ninja pkgconfig 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";
|
2018-06-25 01:17:01 +01:00
|
|
|
mesonFlags = stdenv.lib.optionals (!fuseSupport) [ "-Dfuse=false" ]
|
|
|
|
++ stdenv.lib.optionals (!udevSupport) [ "-Dudev=false" ]
|
|
|
|
++ stdenv.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"
|
|
|
|
'';
|
|
|
|
|
2018-06-24 22:06:36 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Content-Addressable Data Synchronizer";
|
|
|
|
homepage = https://github.com/systemd/casync;
|
|
|
|
license = licenses.lgpl21;
|
2018-06-25 01:17:27 +01:00
|
|
|
platforms = platforms.linux;
|
2018-06-24 22:06:36 +01:00
|
|
|
maintainers = with maintainers; [ flokli ];
|
|
|
|
};
|
|
|
|
}
|