nixpkgs/pkgs/by-name/li/libzim/package.nix
2026-05-15 11:03:44 +00:00

67 lines
1.2 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
nix-update-script,
icu,
meson,
ninja,
pkg-config,
python3,
xapian,
xz,
zstd,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libzim";
version = "9.7.0";
src = fetchFromGitHub {
owner = "openzim";
repo = "libzim";
tag = finalAttrs.version;
hash = "sha256-W7s+RFC9g/IeZkbM/YJCwSfTjBQ8urYKZzyMJDFpAAM=";
};
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"
];
passthru.updateScript = nix-update-script { };
meta = {
description = "Reference implementation of the ZIM specification";
homepage = "https://github.com/openzim/libzim";
changelog = "https://github.com/openzim/libzim/releases/tag/${finalAttrs.version}";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [
fab
greg
];
};
})