1{ stdenv, lib, fetchurl, buildDunePackage, ocaml, ounit2 }:
2
3buildDunePackage rec {
4 pname = "dtoa";
5 version = "0.3.3";
6
7 src = fetchurl {
8 url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-${version}.tbz";
9 hash = "sha256-2PRgjJ6Ssp4l6jHzv1/MqzlomQlJkKLVnRXG6KPJ7j4=";
10 };
11
12 checkInputs = [ ounit2 ];
13
14 doCheck = lib.versionAtLeast ocaml.version "4.08";
15
16 hardeningDisable = lib.optional stdenv.cc.isClang "strictoverflow";
17
18 meta = with lib; {
19 homepage = "https://github.com/flowtype/ocaml-dtoa";
20 description = "Converts OCaml floats into strings (doubles to ascii, \"d to a\"), using the efficient Grisu3 algorithm.";
21 license = licenses.mit;
22 maintainers = [ maintainers.eqyiel ];
23 };
24}