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