1 { lib, stdenv, fetchFromGitHub, cmake, lua, pkg-config, rsync,
2 asciidoc, libxml2, docbook_xml_dtd_45, docbook_xsl, libxslt, apple-sdk_11 }:
5 xnu = apple-sdk_11.sourceRelease "xnu";
7 stdenv.mkDerivation rec {
11 src = fetchFromGitHub {
14 rev = "release-${version}";
15 hash = "sha256-QBmvS1HGF3VWS+5aLgDr9AmUfEsuSz+DTFIeql2XHH4=";
19 substituteInPlace default-rsync.lua \
20 --replace "/usr/bin/rsync" "${rsync}/bin/rsync"
23 # Special flags needed on Darwin:
24 # https://github.com/axkibe/lsyncd/blob/42413cabbedca429d55a5378f6e830f191f3cc86/INSTALL#L51
25 cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [
31 dontUseCmakeBuildDir = true;
33 nativeBuildInputs = [ cmake pkg-config ];
37 asciidoc libxml2 docbook_xml_dtd_45 docbook_xsl libxslt
38 ] ++ lib.optional stdenv.hostPlatform.isDarwin apple-sdk_11;
41 homepage = "https://github.com/axkibe/lsyncd";
42 description = "Utility that synchronizes local directories with remote targets";
43 mainProgram = "lsyncd";
44 license = licenses.gpl2Plus;
45 platforms = platforms.all;
46 maintainers = with maintainers; [ bobvanderlinden ];