2022-09-09 14:08:57 +00:00
|
|
|
{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, cmdliner }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
if lib.versionOlder ocaml.version "4.08"
|
2020-04-24 23:36:52 +00:00
|
|
|
then throw "fmt is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2022-09-09 14:08:57 +00:00
|
|
|
version = "0.9.0";
|
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";
|
2022-09-09 14:08:57 +00:00
|
|
|
sha256 = "sha256-8fsggFoi3XWhN9cnBKNw53ic9r32OUjmgX0cImwUEmE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ];
|
2022-06-26 10:26:21 +00:00
|
|
|
buildInputs = [ cmdliner topkg ];
|
2022-03-05 16:20:37 +00:00
|
|
|
|
|
|
|
strictDeps = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
inherit (topkg) buildPhase installPhase;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with 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
|
|
|
};
|
|
|
|
}
|