1{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uutf }:
2
3let
4 pname = "otfm";
5 version = "0.4.0";
6 webpage = "https://erratique.ch/software/${pname}";
7in
8
9stdenv.mkDerivation {
10
11 pname = "ocaml${ocaml.version}-${pname}";
12 inherit version;
13
14 src = fetchurl {
15 url = "${webpage}/releases/${pname}-${version}.tbz";
16 hash = "sha256-02U23mYTy0ZJgSObDoyygPTGEMC4/Zge5bux4wshaEE=";
17 };
18
19 nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ];
20 buildInputs = [ topkg ];
21
22 propagatedBuildInputs = [ uutf ];
23
24 strictDeps = true;
25
26 inherit (topkg) buildPhase installPhase;
27
28 meta = with lib; {
29 description = "OpenType font decoder for OCaml";
30 longDescription = ''
31 Otfm is an in-memory decoder for the OpenType font data format. It
32 provides low-level access to font tables and functions to decode some
33 of them.
34 '';
35 homepage = webpage;
36 license = licenses.bsd3;
37 maintainers = [ maintainers.jirkamarsik ];
38 mainProgram = "otftrip";
39 inherit (ocaml.meta) platforms;
40 };
41}