about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/misc/kiwix/lib.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/misc/kiwix/lib.nix')
-rw-r--r--nixpkgs/pkgs/applications/misc/kiwix/lib.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/misc/kiwix/lib.nix b/nixpkgs/pkgs/applications/misc/kiwix/lib.nix
new file mode 100644
index 000000000000..dcde5c390a47
--- /dev/null
+++ b/nixpkgs/pkgs/applications/misc/kiwix/lib.nix
@@ -0,0 +1,55 @@
+{ stdenv, lib, fetchFromGitHub
+, meson, ninja, pkg-config
+, python3
+, curl
+, icu
+, pugixml
+, zimlib
+, zlib
+, libmicrohttpd
+, mustache-hpp
+, gtest
+}:
+
+
+stdenv.mkDerivation rec {
+  pname = "kiwix-lib";
+  version = "9.4.1";
+
+  src = fetchFromGitHub {
+    owner = "kiwix";
+    repo = pname;
+    rev = version;
+    sha256 = "034nk6l623v78clrs2d0k1vg69sbzrd8c0q79qiqmlkinck1nkxw";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    python3
+  ];
+
+  buildInputs = [
+    icu
+    zlib
+    mustache-hpp
+  ];
+
+  propagatedBuildInputs = [
+    curl
+    libmicrohttpd
+    pugixml
+    zimlib
+  ];
+
+  checkInputs = [
+    gtest
+  ];
+
+  doCheck = true;
+
+  postPatch = ''
+    patchShebangs scripts
+  '';
+}