depot/third_party/nixpkgs/pkgs/development/ocaml-modules/fmt/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

29 lines
907 B
Nix

{ 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 {
version = "0.8.8";
pname = "ocaml${ocaml.version}-fmt";
src = fetchurl {
url = "https://erratique.ch/software/fmt/releases/fmt-${version}.tbz";
sha256 = "1iy0rwknd302mr15328g805k210xyigxbija6fzqqfzyb43azvk4";
};
nativeBuildInputs = [ ocaml findlib ocamlbuild ];
buildInputs = [ findlib topkg cmdliner ];
propagatedBuildInputs = [ seq stdlib-shims ];
inherit (topkg) buildPhase installPhase;
meta = {
homepage = "https://erratique.ch/software/fmt";
license = stdenv.lib.licenses.isc;
description = "OCaml Format pretty-printer combinators";
inherit (ocaml.meta) platforms;
maintainers = [ stdenv.lib.maintainers.vbgl ];
};
}