nixpkgs/pkgs/applications/networking/sync/lsyncd/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, lua, pkg-config, rsync,
2022-12-22 20:52:15 +00:00
asciidoc, libxml2, docbook_xml_dtd_45, docbook_xsl, libxslt, xnu }:
2015-09-21 13:55:17 +00:00
stdenv.mkDerivation rec {
pname = "lsyncd";
2023-01-21 14:31:11 +00:00
version = "2.3.1";
2015-09-21 13:55:17 +00:00
src = fetchFromGitHub {
owner = "axkibe";
repo = "lsyncd";
rev = "release-${version}";
2023-01-21 14:31:11 +00:00
hash = "sha256-QBmvS1HGF3VWS+5aLgDr9AmUfEsuSz+DTFIeql2XHH4=";
2015-09-21 13:55:17 +00:00
};
2018-08-08 22:09:53 +00:00
postPatch = ''
2015-09-21 13:55:17 +00:00
substituteInPlace default-rsync.lua \
2015-12-20 20:55:08 +00:00
--replace "/usr/bin/rsync" "${rsync}/bin/rsync"
2015-09-21 13:55:17 +00:00
'';
# Special flags needed on Darwin:
# https://github.com/axkibe/lsyncd/blob/42413cabbedca429d55a5378f6e830f191f3cc86/INSTALL#L51
2022-12-22 20:52:15 +00:00
cmakeFlags = lib.optionals stdenv.isDarwin [ "-DWITH_INOTIFY=OFF" "-DWITH_FSEVENTS=ON" "-DXNU_DIR=${xnu}/include" ];
2015-12-20 20:55:08 +00:00
dontUseCmakeBuildDir = true;
2015-09-21 13:55:17 +00:00
nativeBuildInputs = [ cmake pkg-config ];
2015-09-21 13:55:17 +00:00
buildInputs = [
rsync
lua
asciidoc libxml2 docbook_xml_dtd_45 docbook_xsl libxslt
2015-09-21 13:55:17 +00:00
];
meta = with lib; {
homepage = "https://github.com/axkibe/lsyncd";
2015-09-21 13:55:17 +00:00
description = "A utility that synchronizes local directories with remote targets";
license = licenses.gpl2Plus;
platforms = platforms.all;
2015-09-21 13:55:17 +00:00
maintainers = with maintainers; [ bobvanderlinden ];
};
}