From 0da0d8f508416a8067cf0a0d65d93c5e0c0d95d0 Mon Sep 17 00:00:00 2001 From: Reno Dakota <170618376+paparodeo@users.noreply.github.com> Date: Thu, 31 Oct 2024 00:34:28 +0000 Subject: [PATCH] lsyncd: update xnu include path; fix darwin --- .../applications/networking/sync/lsyncd/default.nix | 13 ++++++++++--- pkgs/top-level/all-packages.nix | 1 - 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/networking/sync/lsyncd/default.nix b/pkgs/applications/networking/sync/lsyncd/default.nix index 66fa5665ccaf..8468749b7eaa 100644 --- a/pkgs/applications/networking/sync/lsyncd/default.nix +++ b/pkgs/applications/networking/sync/lsyncd/default.nix @@ -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"; @@ -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; @@ -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"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e62ac36a9367..c4078b2e648b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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; };