From aa7fbe4d2ef0a21baa6b450e112f2351b881f632 Mon Sep 17 00:00:00 2001 From: Patrick Mahoney Date: Sat, 1 Jun 2019 20:33:22 -0500 Subject: [PATCH] ocamlPackages.hmap: init at 0.8.1 --- .../ocaml-modules/hmap/default.nix | 41 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/ocaml-modules/hmap/default.nix diff --git a/pkgs/development/ocaml-modules/hmap/default.nix b/pkgs/development/ocaml-modules/hmap/default.nix new file mode 100644 index 00000000000..563d39909c8 --- /dev/null +++ b/pkgs/development/ocaml-modules/hmap/default.nix @@ -0,0 +1,41 @@ +{ stdenv +, lib +, fetchurl +, findlib +, ocaml +, ocamlbuild +, topkg +}: + +let + minimumSupportedOcamlVersion = "4.02.0"; +in +assert lib.versionOlder minimumSupportedOcamlVersion ocaml.version; + +stdenv.mkDerivation rec { + pname = "hmap"; + version = "0.8.1"; + name = "ocaml${ocaml.version}-${pname}-${version}"; + + src = fetchurl { + url = "http://erratique.ch/software/hmap/releases/${pname}-${version}.tbz"; + sha256 = "10xyjy4ab87z7jnghy0wnla9wrmazgyhdwhr4hdmxxdn28dxn03a"; + }; + + buildInputs = [ ocaml ocamlbuild findlib topkg ]; + + 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 ]; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 820d5af1151..2f093add604 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -271,6 +271,8 @@ let higlo = callPackage ../development/ocaml-modules/higlo { }; + hmap = callPackage ../development/ocaml-modules/hmap { }; + imagelib = callPackage ../development/ocaml-modules/imagelib { }; inotify = callPackage ../development/ocaml-modules/inotify { };