2022-01-03 16:56:52 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, icu
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
2023-01-20 10:41:00 +00:00
|
|
|
, python3
|
|
|
|
, xapian
|
2022-01-03 16:56:52 +00:00
|
|
|
, xz
|
|
|
|
, zstd
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libzim";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "8.2.0";
|
2022-01-03 16:56:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "openzim";
|
|
|
|
repo = pname;
|
2022-12-17 10:02:37 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-Xh1SQNmG4lQ3f/g+i5m36LJO9JlPzP4bNqhyyKT7NEA=";
|
2022-01-03 16:56:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
ninja
|
|
|
|
meson
|
|
|
|
pkg-config
|
2023-01-20 10:41:00 +00:00
|
|
|
python3
|
2022-01-03 16:56:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
icu
|
|
|
|
zstd
|
|
|
|
];
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
xapian
|
|
|
|
xz
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs scripts
|
|
|
|
'';
|
|
|
|
|
2022-01-03 16:56:52 +00:00
|
|
|
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 = with lib; {
|
|
|
|
description = "Reference implementation of the ZIM specification";
|
|
|
|
homepage = "https://github.com/openzim/libzim";
|
2022-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/openzim/libzim/releases/tag/${version}";
|
2022-01-03 16:56:52 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|