2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2018-09-03 22:12:46 +00:00
|
|
|
, meson, ninja, pkgconfig, python3, sphinx
|
2018-06-24 23:49:52 +00:00
|
|
|
, acl, curl, fuse, libselinux, udev, xz, zstd
|
2018-06-25 00:17:01 +00:00
|
|
|
, fuseSupport ? true
|
|
|
|
, selinuxSupport ? true
|
|
|
|
, udevSupport ? true
|
2018-06-24 23:49:52 +00:00
|
|
|
, glibcLocales, rsync
|
|
|
|
}:
|
2018-06-24 21:06:36 +00:00
|
|
|
|
2019-08-13 21:52:01 +00:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "casync";
|
2019-11-03 11:49:02 +00:00
|
|
|
version = "2-219-ga8f6c84";
|
2018-06-24 21:06:36 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "systemd";
|
|
|
|
repo = "casync";
|
2019-11-03 11:49:02 +00:00
|
|
|
rev = "a8f6c841ccfe59ca8c68aad64df170b64042dce8";
|
|
|
|
sha256 = "1i3c9wmpabpmx2wfbcyabmwfa66vz92iq5dlbm89v5mvgavz7bws";
|
2018-06-24 21:06:36 +00:00
|
|
|
};
|
|
|
|
|
2018-06-25 00:17:01 +00:00
|
|
|
buildInputs = [ acl curl xz zstd ]
|
|
|
|
++ stdenv.lib.optionals (fuseSupport) [ fuse ]
|
|
|
|
++ stdenv.lib.optionals (selinuxSupport) [ libselinux ]
|
|
|
|
++ stdenv.lib.optionals (udevSupport) [ udev ];
|
2018-09-03 22:12:46 +00:00
|
|
|
nativeBuildInputs = [ meson ninja pkgconfig python3 sphinx ];
|
2018-06-24 23:49:52 +00:00
|
|
|
checkInputs = [ glibcLocales rsync ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
for f in test/test-*.sh.in; do
|
|
|
|
patchShebangs $f
|
|
|
|
done
|
|
|
|
patchShebangs test/http-server.py
|
|
|
|
'';
|
2018-06-24 21:06:36 +00:00
|
|
|
|
|
|
|
PKG_CONFIG_UDEV_UDEVDIR = "lib/udev";
|
2018-06-25 00:17:01 +00:00
|
|
|
mesonFlags = stdenv.lib.optionals (!fuseSupport) [ "-Dfuse=false" ]
|
|
|
|
++ stdenv.lib.optionals (!udevSupport) [ "-Dudev=false" ]
|
|
|
|
++ stdenv.lib.optionals (!selinuxSupport) [ "-Dselinux=false" ];
|
2018-06-24 21:06:36 +00:00
|
|
|
|
2018-06-24 23:49:52 +00: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 21:06:36 +00:00
|
|
|
description = "Content-Addressable Data Synchronizer";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/systemd/casync";
|
2018-06-24 21:06:36 +00:00
|
|
|
license = licenses.lgpl21;
|
2018-06-25 00:17:27 +00:00
|
|
|
platforms = platforms.linux;
|
2018-06-24 21:06:36 +00:00
|
|
|
maintainers = with maintainers; [ flokli ];
|
|
|
|
};
|
|
|
|
}
|