nixpkgs/pkgs/development/ocaml-modules/fmt/default.nix

30 lines
893 B
Nix
Raw Normal View History

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