From 9d87e8395fe7af0ffd4f24e76d32a44f2350407c Mon Sep 17 00:00:00 2001 From: Ruben Maher Date: Mon, 1 Jan 2018 20:13:27 +1030 Subject: ocamlPackages.dtoa: init at 0.3.1 --- pkgs/development/ocaml-modules/dtoa/default.nix | 32 +++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 pkgs/development/ocaml-modules/dtoa/default.nix (limited to 'pkgs/development/ocaml-modules') diff --git a/pkgs/development/ocaml-modules/dtoa/default.nix b/pkgs/development/ocaml-modules/dtoa/default.nix new file mode 100644 index 000000000000..47d761894d50 --- /dev/null +++ b/pkgs/development/ocaml-modules/dtoa/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchurl, ocaml, findlib, jbuilder, ounit }: + +assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.01"; + +stdenv.mkDerivation rec { + pname = "dtoa"; + name = "ocaml-${pname}-${version}"; + version = "0.3.1"; + + src = fetchurl { + url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-${version}.tbz"; + sha256 = "0rzysj07z2q6gk0yhjxnjnba01vmdb9x32wwna10qk3rrb8r2pnn"; + }; + + unpackCmd = "tar xjf $src"; + + buildInputs = [ ocaml findlib jbuilder ounit ]; + + buildPhase = "jbuilder build -p dtoa"; + + inherit (jbuilder) installPhase; + + createFindLibDestdir = true; + + meta = with stdenv.lib; { + homepage = https://github.com/flowtype/ocaml-dtoa; + description = "Converts OCaml floats into strings (doubles to ascii, \"d to a\"), using the efficient Grisu3 algorithm."; + license = licenses.mit; + platforms = ocaml.meta.platforms or []; + maintainers = [ maintainers.eqyiel ]; + }; +} -- cgit 1.4.1