Get ICDM working

Update libkiwix, kiwixtools, zimlib to latest upstream
Update flake.nix to easily build stable/unstable systems
This commit is contained in:
Greg Hellings
2023-03-15 00:43:31 -05:00
parent d2d8f3b6a3
commit 2e17c25781
5 changed files with 71 additions and 14 deletions
+1
View File
@@ -64,6 +64,7 @@ in rec {
};
kiwix-tools = super.callPackage ./kiwix-tools.nix {};
libkiwix = super.callPackage ./libkiwix.nix {};
zimlib = super.callPackage ./zimlib.nix {};
xonsh = super.xonsh.overridePythonAttrs (old: rec{
python3 = self.gregpy;
+1 -3
View File
@@ -19,9 +19,7 @@ stdenv.mkDerivation rec {
owner = "kiwix";
repo = pname;
rev = version;
# For 3.3.0
#sha256 = "sha256-jeIyHTbgGrYknLaTNNSFVFo9zXyyGZU6dIVv49bEhBw=";
sha256 = "sha256-i3wr0VZCeH3aRCgphIyn6U91Ja+qVT4NVAzJSmniu8o=";
sha256 = "sha256-r3/aTH/YoDuYpKLPakP4toS3OtiRueTUjmR34rdmr+w=";
};
nativeBuildInputs = [
+3 -3
View File
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
owner = "kiwix";
repo = pname;
rev = version;
sha256 = "sha256-vE8bJrNx0oojTgcDhlr+SyfzdpigCZ0pQ2cPYaiZlgw=";
sha256 = "sha256-4FxLxJxVhqbeNqX4vorHkROUuRURvE6AXlteIZCEBtc=";
};
nativeBuildInputs = [
@@ -47,10 +47,10 @@ stdenv.mkDerivation rec {
zlib
];
mesonFlags = [ "--debug" ];
mesonFlags = [ "--debug" "-Dc_args=-I${zimlib}/include/" ];
# Built-in python script uses /usr/bin/env
patchPhase = "patchShebangs --build scripts/kiwix-compile-resources";
patchPhase = "patchShebangs --build scripts/*";
meta = with lib; {
description = "Kiwix file library for use by other applications";
+57
View File
@@ -0,0 +1,57 @@
{ lib, stdenv, fetchFromGitHub
, meson, ninja, pkg-config
, python3
, icu
, libuuid
, xapian
, xz
, zstd
, gtest
}:
stdenv.mkDerivation rec {
pname = "zimlib";
version = "8.1.0";
src = fetchFromGitHub {
owner = "openzim";
repo = "libzim";
rev = version;
sha256 = "sha256-ab7UUF+I0/xaGChvdjylEQRHLOjmtg/wk+/JEGehGLE=";
};
nativeBuildInputs = [
meson
pkg-config
ninja
python3
];
propagatedBuildInputs = [
icu
libuuid
xapian
xz
zstd
];
postPatch = ''
patchShebangs scripts
'';
mesonFlags = [ "-Dtest_data_dir=none" ];
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; [ ajs124 ];
platforms = platforms.linux;
};
}