summary refs log tree commit diff
diff options
context:
space:
mode:
authorajs124 <git@ajs124.de>2021-03-28 00:28:44 +0100
committerajs124 <git@ajs124.de>2021-03-30 14:58:43 +0200
commit8e304bd0e00025a9138c2c54de31a9ecfe5c174a (patch)
treece6473bd27d647dacf9efb34fab9a2634fc6301b
parentd07b2182c39babbecfaa73b2f24531581fa48a7f (diff)
downloadnixpkgs-8e304bd0e00025a9138c2c54de31a9ecfe5c174a.tar
nixpkgs-8e304bd0e00025a9138c2c54de31a9ecfe5c174a.tar.gz
nixpkgs-8e304bd0e00025a9138c2c54de31a9ecfe5c174a.tar.bz2
nixpkgs-8e304bd0e00025a9138c2c54de31a9ecfe5c174a.tar.lz
nixpkgs-8e304bd0e00025a9138c2c54de31a9ecfe5c174a.tar.xz
nixpkgs-8e304bd0e00025a9138c2c54de31a9ecfe5c174a.tar.zst
nixpkgs-8e304bd0e00025a9138c2c54de31a9ecfe5c174a.zip
zimlib: 1.4 -> 6.3.0
-rw-r--r--pkgs/development/libraries/zimlib/default.nix48
1 files changed, 40 insertions, 8 deletions
diff --git a/pkgs/development/libraries/zimlib/default.nix b/pkgs/development/libraries/zimlib/default.nix
index 6dc998cd0e2..76d54ed6256 100644
--- a/pkgs/development/libraries/zimlib/default.nix
+++ b/pkgs/development/libraries/zimlib/default.nix
@@ -1,23 +1,55 @@
-{ lib, 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.0";
 
-  src = fetchurl {
-    url = "http://www.openzim.org/download/${pname}-${version}.tar.gz";
-    sha256 = "14ra3iq42x53k1nqxb5lsg4gadlkpkgv6cbjjl6305ajmbrghcdq";
+  src = fetchFromGitHub {
+    owner = "openzim";
+    repo = "libzim";
+    rev = version;
+    sha256 = "0iy0f1clhihq277x218ccx3mszgpr3h9l0by48b9ykr115nffw3s";
   };
 
-  buildInputs = [ lzma ];
+  nativeBuildInputs = [
+    meson
+    pkg-config
+    ninja
+    python3
+  ];
 
-  enableParallelBuilding = true;
+  propagatedBuildInputs = [
+    icu
+    libuuid
+    xapian
+    xz
+    zstd
+  ];
+
+  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;
   };
 }