1{
2 lib,
3 stdenv,
4 fetchurl,
5 ocaml,
6 findlib,
7 ocamlbuild,
8 topkg,
9 cmdliner,
10}:
11
12lib.throwIfNot (lib.versionAtLeast ocaml.version "4.14")
13 "zipc is not available for OCaml ${ocaml.version}"
14
15 stdenv.mkDerivation
16 rec {
17 pname = "ocaml${ocaml.version}-zipc";
18 version = "0.2.0";
19
20 src = fetchurl {
21 url = "https://erratique.ch/software/zipc/releases/zipc-${version}.tbz";
22 hash = "sha256-YQqkCURwrJgFH0+zgfket25zJQ4w+Tcc1mTSrDuWRt0=";
23 };
24
25 strictDeps = true;
26
27 nativeBuildInputs = [
28 ocaml
29 findlib
30 ocamlbuild
31 ];
32
33 buildInputs = [
34 cmdliner
35 topkg
36 ];
37
38 inherit (topkg) buildPhase installPhase;
39
40 meta = {
41 description = "ZIP archive and deflate codec for OCaml";
42 homepage = "https://erratique.ch/software/zipc";
43 license = lib.licenses.isc;
44 maintainers = [ lib.maintainers.vbgl ];
45 };
46 }