about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libzim
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libzim')
-rw-r--r--nixpkgs/pkgs/development/libraries/libzim/default.nix48
1 files changed, 48 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libzim/default.nix b/nixpkgs/pkgs/development/libraries/libzim/default.nix
new file mode 100644
index 000000000000..abb570730f66
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libzim/default.nix
@@ -0,0 +1,48 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, icu
+, meson
+, ninja
+, pkg-config
+, xz
+, zstd
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libzim";
+  version = "8.0.0";
+
+  src = fetchFromGitHub {
+    owner = "openzim";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-FSotc2hkWvkYEdZ3HI3JLzjtKFaWOc1Bx6r0WyeS/Kg=";
+  };
+
+  nativeBuildInputs = [
+    ninja
+    meson
+    pkg-config
+  ];
+
+  buildInputs = [
+    icu
+    xz
+    zstd
+  ];
+
+  mesonFlags = [
+    # Tests are located at https://github.com/openzim/zim-testing-suite
+    # "...some tests need up to 16GB of memory..."
+    "-Dtest_data_dir=none"
+    "-Dwith_xapian=false"
+  ];
+
+  meta = with lib; {
+    description = "Reference implementation of the ZIM specification";
+    homepage = "https://github.com/openzim/libzim";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ fab ];
+  };
+}