1{ lib
2, stdenv
3, fetchFromGitHub
4, autoreconfHook
5, wxGTK32
6, chmlib
7}:
8
9stdenv.mkDerivation rec {
10 pname = "xchm";
11 version = "1.35";
12
13 src = fetchFromGitHub {
14 owner = "rzvncj";
15 repo = "xCHM";
16 rev = version;
17 sha256 = "sha256-ZJvlllhF7KPz+v6KEVPyJjiz+4LHM2Br/oqI54a2Ews=";
18 };
19
20 nativeBuildInputs = [
21 autoreconfHook
22 ];
23
24 buildInputs = [
25 wxGTK32
26 chmlib
27 ];
28
29 configureFlags = [ "--with-wx-prefix=${wxGTK32}" ];
30
31 preConfigure = ''
32 export LDFLAGS="$LDFLAGS $(${wxGTK32}/bin/wx-config --libs | sed -e s@-pthread@@) -lwx_gtk3u_aui-3.2"
33 '';
34
35 meta = with lib; {
36 description = "A viewer for Microsoft HTML Help files";
37 homepage = "https://github.com/rzvncj/xCHM";
38 license = licenses.gpl2;
39 maintainers = with maintainers; [ sikmir ];
40 platforms = platforms.linux;
41 };
42}