1{
2 lib,
3 stdenv,
4 fetchurl,
5 ocaml,
6 findlib,
7 ocamlbuild,
8 topkg,
9 cmdliner,
10}:
11
12if lib.versionOlder ocaml.version "4.08" then
13 throw "fmt is not available for OCaml ${ocaml.version}"
14else
15
16 stdenv.mkDerivation rec {
17 version = "0.10.0";
18 pname = "ocaml${ocaml.version}-fmt";
19
20 src = fetchurl {
21 url = "https://erratique.ch/software/fmt/releases/fmt-${version}.tbz";
22 sha256 = "sha256-eDgec+FW2F85LzfkKFqsmYd3MWWZsBIXMhlXT3xdKZc=";
23 };
24
25 nativeBuildInputs = [
26 ocaml
27 findlib
28 ocamlbuild
29 topkg
30 ];
31 buildInputs = [
32 cmdliner
33 topkg
34 ];
35
36 strictDeps = true;
37
38 inherit (topkg) buildPhase installPhase;
39
40 meta = with lib; {
41 homepage = "https://erratique.ch/software/fmt";
42 license = licenses.isc;
43 description = "OCaml Format pretty-printer combinators";
44 inherit (ocaml.meta) platforms;
45 maintainers = [ maintainers.vbgl ];
46 };
47 }