xchm: enable on darwin (#413448)

This commit is contained in:
Nikolay Korotkiy 2025-06-04 23:03:38 +04:00 committed by GitHub
commit 9c09d5e27c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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";
};
}