2022-06-26 10:26:21 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchzip
|
2021-04-05 15:23:46 +00:00
|
|
|
, meson, ninja, pkg-config
|
|
|
|
, python3
|
|
|
|
, icu
|
|
|
|
, libuuid
|
|
|
|
, xapian
|
|
|
|
, xz
|
|
|
|
, zstd
|
|
|
|
, gtest
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "zimlib";
|
2022-06-26 10:26:21 +00:00
|
|
|
version = "7.2.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "openzim";
|
|
|
|
repo = "libzim";
|
|
|
|
rev = version;
|
2022-06-26 10:26:21 +00:00
|
|
|
sha256 = "sha256-AEhhjinnnMA4NbYL7NVHYeRZX/zfNiidbY/VeFjZuQs=";
|
|
|
|
};
|
|
|
|
|
|
|
|
testData = fetchzip rec {
|
|
|
|
passthru.version = "0.4";
|
|
|
|
url = "https://github.com/openzim/zim-testing-suite/releases/download/v${passthru.version}/zim-testing-suite-${passthru.version}.tar.gz";
|
|
|
|
sha256 = "sha256-2eJqmvs/GrvOD/pq8dTubaiO9ZpW2WqTNQByv354Z0w=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
pkg-config
|
|
|
|
ninja
|
|
|
|
python3
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
icu
|
|
|
|
libuuid
|
|
|
|
xapian
|
|
|
|
xz
|
|
|
|
zstd
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs scripts
|
|
|
|
'';
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
mesonFlags = [ "-Dtest_data_dir=${testData}" ];
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
checkInputs = [
|
|
|
|
gtest
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Library for reading and writing ZIM files";
|
|
|
|
homepage = "https://www.openzim.org/wiki/Zimlib";
|
|
|
|
license = licenses.gpl2;
|
2021-04-05 15:23:46 +00:00
|
|
|
maintainers = with maintainers; [ ajs124 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|