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