2020-04-09 17:58:36 +01:00
|
|
|
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, cmdliner, seq, stdlib-shims }:
|
2016-10-25 18:19:35 +01:00
|
|
|
|
2020-04-09 17:58:36 +01:00
|
|
|
if !stdenv.lib.versionAtLeast ocaml.version "4.03"
|
|
|
|
then throw "fmt is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "0.8.6";
|
|
|
|
pname = "ocaml${ocaml.version}-fmt";
|
2016-10-25 18:19:35 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-04-09 17:58:36 +01:00
|
|
|
url = "https://erratique.ch/software/fmt/releases/fmt-${version}.tbz";
|
|
|
|
sha256 = "1jlw5izgvqw1adzqi87rp0383j0vj52wmacy3rqw87vxkf7a3xin";
|
2016-10-25 18:19:35 +01:00
|
|
|
};
|
|
|
|
|
2019-10-31 10:16:15 +00:00
|
|
|
nativeBuildInputs = [ ocaml findlib ocamlbuild ];
|
|
|
|
buildInputs = [ findlib topkg cmdliner ];
|
2020-04-09 17:58:36 +01:00
|
|
|
propagatedBuildInputs = [ seq stdlib-shims ];
|
2016-10-25 18:19:35 +01:00
|
|
|
|
|
|
|
inherit (topkg) buildPhase installPhase;
|
|
|
|
|
|
|
|
meta = {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://erratique.ch/software/fmt";
|
2016-10-25 18:19:35 +01:00
|
|
|
license = stdenv.lib.licenses.isc;
|
|
|
|
description = "OCaml Format pretty-printer combinators";
|
|
|
|
inherit (ocaml.meta) platforms;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.vbgl ];
|
|
|
|
};
|
|
|
|
}
|