summaryrefslogtreecommitdiffstats
path: root/pkgs/development/ocaml-modules/hmap/default.nix
blob: 31b5b8d180c8290bb8ff22c1a7a332af301e0457 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{
  stdenv,
  lib,
  fetchurl,
  findlib,
  ocaml,
  ocamlbuild,
  topkg,
}:

let
  minimumSupportedOcamlVersion = "4.02.0";
in
stdenv.mkDerivation rec {
  pname = "hmap";
  version = "0.8.1";
  name = "ocaml${ocaml.version}-${pname}-${version}";

  src = fetchurl {
    url = "https://erratique.ch/software/hmap/releases/${pname}-${version}.tbz";
    sha256 = "10xyjy4ab87z7jnghy0wnla9wrmazgyhdwhr4hdmxxdn28dxn03a";
  };

  nativeBuildInputs = [
    ocaml
    ocamlbuild
    findlib
    topkg
  ];
  buildInputs = [ topkg ];

  strictDeps = true;

  inherit (topkg) installPhase;

  buildPhase = "${topkg.run} build --tests true";

  doCheck = true;

  checkPhase = "${topkg.run} test";

  meta = {
    description = "Heterogeneous value maps for OCaml";
    homepage = "https://erratique.ch/software/hmap";
    license = lib.licenses.isc;
    maintainers = [ lib.maintainers.pmahoney ];
    broken = !(lib.versionOlder minimumSupportedOcamlVersion ocaml.version);
  };
}