2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, cmdliner, seq, stdlib-shims }:
|
|
|
|
|
|
|
|
if !stdenv.lib.versionAtLeast ocaml.version "4.05"
|
|
|
|
then throw "fmt is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-10-11 12:50:04 +00:00
|
|
|
version = "0.8.9";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "ocaml${ocaml.version}-fmt";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://erratique.ch/software/fmt/releases/fmt-${version}.tbz";
|
2020-10-11 12:50:04 +00:00
|
|
|
sha256 = "0gkkkj4x678vxdda4xaw2dd44qjacavsvn5nx8gydfwah6pjbkxk";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ ocaml findlib ocamlbuild ];
|
|
|
|
buildInputs = [ findlib topkg cmdliner ];
|
|
|
|
propagatedBuildInputs = [ seq stdlib-shims ];
|
|
|
|
|
|
|
|
inherit (topkg) buildPhase installPhase;
|
|
|
|
|
2020-10-11 12:50:04 +00:00
|
|
|
meta = with stdenv.lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://erratique.ch/software/fmt";
|
2020-10-11 12:50:04 +00:00
|
|
|
license = licenses.isc;
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "OCaml Format pretty-printer combinators";
|
|
|
|
inherit (ocaml.meta) platforms;
|
2020-10-11 12:50:04 +00:00
|
|
|
maintainers = [ maintainers.vbgl ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|