1{ stdenv
2, lib
3, fetchurl
4, findlib
5, ocaml
6, ocamlbuild
7, topkg
8}:
9
10let
11 minimumSupportedOcamlVersion = "4.02.0";
12in
13assert lib.versionOlder minimumSupportedOcamlVersion ocaml.version;
14
15stdenv.mkDerivation rec {
16 pname = "hmap";
17 version = "0.8.1";
18 name = "ocaml${ocaml.version}-${pname}-${version}";
19
20 src = fetchurl {
21 url = "http://erratique.ch/software/hmap/releases/${pname}-${version}.tbz";
22 sha256 = "10xyjy4ab87z7jnghy0wnla9wrmazgyhdwhr4hdmxxdn28dxn03a";
23 };
24
25 nativeBuildInputs = [ ocaml ocamlbuild findlib topkg ];
26 buildInputs = [ topkg ];
27
28 strictDeps = true;
29
30 inherit (topkg) installPhase;
31
32 buildPhase = "${topkg.run} build --tests true";
33
34 doCheck = true;
35
36 checkPhase = "${topkg.run} test";
37
38 meta = {
39 description = "Heterogeneous value maps for OCaml";
40 homepage = "https://erratique.ch/software/hmap";
41 license = lib.licenses.isc;
42 maintainers = [ lib.maintainers.pmahoney ];
43 };
44}