@@ -0,0 +1,48 @@
1+{ lib
2+, stdenv
3+, fetchFromGitHub
4+, icu
5+, meson
6+, ninja
7+, pkg-config
8+, xz
9+, zstd
10+}:
11+
12+stdenv.mkDerivation rec {
13+ pname = "libzim";
14+ version = "7.0.0";
15+
16+ src = fetchFromGitHub {
17+ owner = "openzim";
18+ repo = pname;
19+ rev = version;
20+ sha256 = "sha256-OQVGopAInAI7KCEVr3BxaKD6np2QcFCaDjgNWjT202U=";
21+ };
22+
23+ nativeBuildInputs = [
24+ ninja
25+ meson
26+ pkg-config
27+ ];
28+
29+ buildInputs = [
30+ icu
31+ xz
32+ zstd
33+ ];
34+
35+ mesonFlags = [
36+ # Tests are located at https://github.com/openzim/zim-testing-suite
37+ # "...some tests need up to 16GB of memory..."
38+ "-Dtest_data_dir=none"
39+ "-Dwith_xapian=false"
40+ ];
41+
42+ meta = with lib; {
43+ description = "Reference implementation of the ZIM specification";
44+ homepage = "https://github.com/openzim/libzim";
45+ license = licenses.gpl2Plus;
46+ maintainers = with maintainers; [ fab ];
47+ };
48+}