Unverified Commit 9c09d5e2 authored by Nikolay Korotkiy's avatar Nikolay Korotkiy Committed by GitHub
Browse files

xchm: enable on darwin (#413448)

parents e32c4854 92471515
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@
  autoreconfHook,
  wxGTK32,
  chmlib,
  desktopToDarwinBundle,
}:

stdenv.mkDerivation rec {
@@ -18,8 +19,12 @@ stdenv.mkDerivation rec {
    sha256 = "sha256-UMn8ds4nheuYSu0PesxdGoyxyn5AcKq9WByeRUxxx3k=";
  };

  nativeBuildInputs = [
  nativeBuildInputs =
    [
      autoreconfHook
    ]
    ++ lib.optionals stdenv.hostPlatform.isDarwin [
      desktopToDarwinBundle
    ];

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