Files
nixpkgs/pkgs/by-name/li/libzim/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

74 lines
1.4 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
icu,
meson,
ninja,
pkg-config,
python3,
xapian,
xz,
zstd,
}:
stdenv.mkDerivation rec {
pname = "libzim";
version = "9.3.0";
src = fetchFromGitHub {
owner = "openzim";
repo = "libzim";
tag = version;
hash = "sha256-DZiFeZ2ry3JpXDs3mvf0q7diwhkjQ2730KQkDQPbgcY=";
};
patches = [
# Upstream patch for ICU76 compatibility.
# https://github.com/openzim/libzim/pull/936
(fetchpatch {
url = "https://github.com/openzim/libzim/commit/4a42b3c6971c9534b104f48f6d13db8630a97d2f.patch";
hash = "sha256-FjaGZ2bI1ROLg3rvWIGLbVoImGr51MbWjbBj+lGj1rs=";
})
];
nativeBuildInputs = [
ninja
meson
pkg-config
python3
];
buildInputs = [
icu
zstd
];
propagatedBuildInputs = [
xapian
xz
];
postPatch = ''
patchShebangs scripts
'';
mesonFlags = [
# Tests are located at https://github.com/openzim/zim-testing-suite
# "...some tests need up to 16GB of memory..."
"-Dtest_data_dir=none"
];
meta = {
description = "Reference implementation of the ZIM specification";
homepage = "https://github.com/openzim/libzim";
changelog = "https://github.com/openzim/libzim/releases/tag/${version}";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [
fab
greg
];
};
}