From d39886db5a26d813aebfecb07f196f1d9bca26da Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 5 Dec 2017 18:19:25 +0000 Subject: ocamlPackages.digestif: init at 0.5 Digestif provides some hash functions in OCaml. Homepage: https://github.com/mirage/digestif --- .../development/ocaml-modules/digestif/default.nix | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 pkgs/development/ocaml-modules/digestif/default.nix (limited to 'pkgs/development') diff --git a/pkgs/development/ocaml-modules/digestif/default.nix b/pkgs/development/ocaml-modules/digestif/default.nix new file mode 100644 index 000000000000..cf8b5335d594 --- /dev/null +++ b/pkgs/development/ocaml-modules/digestif/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg }: + +if !stdenv.lib.versionAtLeast ocaml.version "4.3" +then throw "digestif is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-digestif-${version}"; + version = "0.5"; + + src = fetchurl { + url = "https://github.com/mirage/digestif/releases/download/v${version}/digestif-${version}.tbz"; + sha256 = "0fsyfi5ps17j3wjav5176gf6z3a5xcw9aqhcr1gml9n9ayfbkhrd"; + }; + + unpackCmd = "tar -xjf $curSrc"; + + buildInputs = [ ocaml findlib ocamlbuild topkg ]; + + inherit (topkg) buildPhase installPhase; + + meta = { + description = "Simple hash algorithms in OCaml"; + homepage = "https://github.com/mirage/digestif"; + license = stdenv.lib.licenses.mit; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + inherit (ocaml.meta) platforms; + }; +} -- cgit 1.4.1