at 24.05-pre 30 lines 842 B view raw
1{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, cmdliner }: 2 3if lib.versionOlder ocaml.version "4.08" 4then throw "fmt is not available for OCaml ${ocaml.version}" 5else 6 7stdenv.mkDerivation rec { 8 version = "0.9.0"; 9 pname = "ocaml${ocaml.version}-fmt"; 10 11 src = fetchurl { 12 url = "https://erratique.ch/software/fmt/releases/fmt-${version}.tbz"; 13 sha256 = "sha256-8fsggFoi3XWhN9cnBKNw53ic9r32OUjmgX0cImwUEmE="; 14 }; 15 16 nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ]; 17 buildInputs = [ cmdliner topkg ]; 18 19 strictDeps = true; 20 21 inherit (topkg) buildPhase installPhase; 22 23 meta = with lib; { 24 homepage = "https://erratique.ch/software/fmt"; 25 license = licenses.isc; 26 description = "OCaml Format pretty-printer combinators"; 27 inherit (ocaml.meta) platforms; 28 maintainers = [ maintainers.vbgl ]; 29 }; 30}