about summary refs log tree commit diff
path: root/pkgs/applications/misc/kiwix/lib.nix
blob: aa9117997c08a427521e982f8441b9ba3e5b0433 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{ lib, stdenv, fetchFromGitHub
, meson, ninja, pkg-config
, python3
, curl
, icu
, libzim
, pugixml
, zlib
, libmicrohttpd
, mustache-hpp
, gtest
}:

stdenv.mkDerivation rec {
  pname = "libkiwix";
  version = "12.1.1";

  src = fetchFromGitHub {
    owner = "kiwix";
    repo = pname;
    rev = version;
    sha256 = "sha256-hcwLxfn1fiUAiwsnIddv4HukvVrFePtx7sDQUD1lGUA=";
  };

  nativeBuildInputs = [
    meson
    ninja
    pkg-config
    python3
  ];

  buildInputs = [
    icu
    zlib
    mustache-hpp
  ];

  propagatedBuildInputs = [
    curl
    libmicrohttpd
    libzim
    pugixml
  ];

  nativeCheckInputs = [
    gtest
  ];

  doCheck = true;

  postPatch = ''
    patchShebangs scripts
  '';

  meta = with lib; {
    description = "Common code base for all Kiwix ports";
    homepage = "https://kiwix.org";
    license = licenses.gpl3Plus;
    platforms = platforms.linux;
    maintainers = with maintainers; [ colinsane ];
  };
}