From 92471515db3dfead334570d6a27523252c1d1e8c Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Mon, 2 Jun 2025 22:05:48 -0400 Subject: [PATCH] xchm: enable on darwin Signed-off-by: Ihar Hrachyshka --- pkgs/by-name/xc/xchm/package.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/xc/xchm/package.nix b/pkgs/by-name/xc/xchm/package.nix index 3472dbfa0d57..cc53ca5f208d 100644 --- a/pkgs/by-name/xc/xchm/package.nix +++ b/pkgs/by-name/xc/xchm/package.nix @@ -5,6 +5,7 @@ autoreconfHook, wxGTK32, chmlib, + desktopToDarwinBundle, }: stdenv.mkDerivation rec { @@ -18,9 +19,13 @@ stdenv.mkDerivation rec { sha256 = "sha256-UMn8ds4nheuYSu0PesxdGoyxyn5AcKq9WByeRUxxx3k="; }; - nativeBuildInputs = [ - autoreconfHook - ]; + nativeBuildInputs = + [ + autoreconfHook + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + desktopToDarwinBundle + ]; buildInputs = [ wxGTK32 @@ -30,7 +35,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-wx-prefix=${wxGTK32}" ]; preConfigure = '' - export LDFLAGS="$LDFLAGS $(${wxGTK32}/bin/wx-config --libs | sed -e s@-pthread@@) -lwx_gtk3u_aui-3.2" + export LDFLAGS="$LDFLAGS $(${wxGTK32}/bin/wx-config --libs std,aui | sed -e s@-pthread@@)" ''; meta = with lib; { @@ -38,7 +43,7 @@ stdenv.mkDerivation rec { homepage = "https://github.com/rzvncj/xCHM"; license = licenses.gpl2; maintainers = with maintainers; [ sikmir ]; - platforms = platforms.linux; + platforms = platforms.unix; mainProgram = "xchm"; }; }