Skip to content

Commit

Permalink
lsyncd: update xnu include path; fix darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
paparodeo committed Oct 31, 2024
1 parent ce8b620 commit 0da0d8f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
13 changes: 10 additions & 3 deletions pkgs/applications/networking/sync/lsyncd/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{ lib, stdenv, fetchFromGitHub, cmake, lua, pkg-config, rsync,
asciidoc, libxml2, docbook_xml_dtd_45, docbook_xsl, libxslt, xnu }:
asciidoc, libxml2, docbook_xml_dtd_45, docbook_xsl, libxslt, apple-sdk_11 }:

let
xnu = apple-sdk_11.sourceRelease "xnu";
in
stdenv.mkDerivation rec {
pname = "lsyncd";
version = "2.3.1";
Expand All @@ -19,7 +22,11 @@ stdenv.mkDerivation rec {

# Special flags needed on Darwin:
# https://github.com/axkibe/lsyncd/blob/42413cabbedca429d55a5378f6e830f191f3cc86/INSTALL#L51
cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "-DWITH_INOTIFY=OFF" "-DWITH_FSEVENTS=ON" "-DXNU_DIR=${xnu}/include" ];
cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [
"-DWITH_INOTIFY=OFF"
"-DWITH_FSEVENTS=ON"
"-DXNU_DIR=${xnu}"
];

dontUseCmakeBuildDir = true;

Expand All @@ -28,7 +35,7 @@ stdenv.mkDerivation rec {
rsync
lua
asciidoc libxml2 docbook_xml_dtd_45 docbook_xsl libxslt
];
] ++ lib.optional stdenv.hostPlatform.isDarwin apple-sdk_11;

meta = with lib; {
homepage = "https://github.com/axkibe/lsyncd";
Expand Down
1 change: 0 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9144,7 +9144,6 @@ with pkgs;
lsdvd = callPackage ../tools/cd-dvd/lsdvd { };

lsyncd = callPackage ../applications/networking/sync/lsyncd {
inherit (darwin) xnu;
lua = lua5_2_compat;
};

Expand Down

0 comments on commit 0da0d8f

Please sign in to comment.