summary refs log tree commit diff
path: root/pkgs/development/libraries/zimlib
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/zimlib')
-rw-r--r--pkgs/development/libraries/zimlib/default.nix50
1 files changed, 41 insertions, 9 deletions
diff --git a/pkgs/development/libraries/zimlib/default.nix b/pkgs/development/libraries/zimlib/default.nix
index 7f5168080fa..9f8e357d3ab 100644
--- a/pkgs/development/libraries/zimlib/default.nix
+++ b/pkgs/development/libraries/zimlib/default.nix
@@ -1,23 +1,55 @@
-{ stdenv, fetchurl, lzma }:
+{ lib, stdenv, fetchFromGitHub
+, meson, ninja, pkg-config
+, python3
+, icu
+, libuuid
+, xapian
+, xz
+, zstd
+, gtest
+}:
 
 stdenv.mkDerivation rec {
   pname = "zimlib";
-  version = "1.4";
+  version = "6.3.2";
 
-  src = fetchurl {
-    url = "http://www.openzim.org/download/${pname}-${version}.tar.gz";
-    sha256 = "14ra3iq42x53k1nqxb5lsg4gadlkpkgv6cbjjl6305ajmbrghcdq";
+  src = fetchFromGitHub {
+    owner = "openzim";
+    repo = "libzim";
+    rev = version;
+    sha256 = "sha256-xlYu74akK9WFy86hcQe7zp11TImwl8llgDIZBRgmbAI=";
   };
 
-  buildInputs = [ lzma ];
+  nativeBuildInputs = [
+    meson
+    pkg-config
+    ninja
+    python3
+  ];
 
-  enableParallelBuilding = true;
+  propagatedBuildInputs = [
+    icu
+    libuuid
+    xapian
+    xz
+    zstd
+  ];
 
-  meta = with stdenv.lib; {
+  postPatch = ''
+    patchShebangs scripts
+  '';
+
+  checkInputs = [
+    gtest
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
     description = "Library for reading and writing ZIM files";
     homepage =  "https://www.openzim.org/wiki/Zimlib";
     license = licenses.gpl2;
-    maintainers = with maintainers; [ robbinch ];
+    maintainers = with maintainers; [ ajs124 ];
     platforms = platforms.linux;
   };
 }