nixpkgs/pkgs/development/libraries/zimlib/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

64 lines
1.2 KiB
Nix
Raw Normal View History

2022-06-10 14:20:37 +00:00
{ lib, stdenv, fetchFromGitHub, fetchzip
2021-03-27 23:28:44 +00:00
, meson, ninja, pkg-config
, python3
, icu
, libuuid
, xapian
, xz
, zstd
, gtest
}:
2017-03-07 12:09:33 +00:00
stdenv.mkDerivation rec {
pname = "zimlib";
2022-06-10 14:20:37 +00:00
version = "7.2.2";
2017-03-07 12:09:33 +00:00
2021-03-27 23:28:44 +00:00
src = fetchFromGitHub {
owner = "openzim";
repo = "libzim";
rev = version;
2022-06-10 14:20:37 +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=";
};
2021-03-27 23:28:44 +00:00
nativeBuildInputs = [
meson
pkg-config
ninja
python3
];
2017-03-07 12:09:33 +00:00
2021-03-27 23:28:44 +00:00
propagatedBuildInputs = [
icu
libuuid
xapian
xz
zstd
];
postPatch = ''
patchShebangs scripts
'';
2022-06-10 14:20:37 +00:00
mesonFlags = [ "-Dtest_data_dir=${testData}" ];
2021-03-27 23:28:44 +00:00
checkInputs = [
gtest
];
doCheck = true;
2017-03-07 12:09:33 +00:00
meta = with lib; {
2017-03-07 12:09:33 +00:00
description = "Library for reading and writing ZIM files";
homepage = "https://www.openzim.org/wiki/Zimlib";
2017-03-07 12:09:33 +00:00
license = licenses.gpl2;
2021-03-27 23:28:44 +00:00
maintainers = with maintainers; [ ajs124 ];
2017-03-07 12:09:33 +00:00
platforms = platforms.linux;
};
}