2022-12-17 10:02:37 +00:00
|
|
|
{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uutf }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
pname = "otfm";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "0.4.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
webpage = "https://erratique.ch/software/${pname}";
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
pname = "ocaml${ocaml.version}-${pname}";
|
|
|
|
inherit version;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "${webpage}/releases/${pname}-${version}.tbz";
|
2022-12-17 10:02:37 +00:00
|
|
|
hash = "sha256-02U23mYTy0ZJgSObDoyygPTGEMC4/Zge5bux4wshaEE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ];
|
|
|
|
buildInputs = [ topkg ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
propagatedBuildInputs = [ uutf ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit (topkg) buildPhase installPhase;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "OpenType font decoder for OCaml";
|
|
|
|
longDescription = ''
|
|
|
|
Otfm is an in-memory decoder for the OpenType font data format. It
|
|
|
|
provides low-level access to font tables and functions to decode some
|
|
|
|
of them.
|
|
|
|
'';
|
|
|
|
homepage = webpage;
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.jirkamarsik ];
|
2022-05-18 14:49:53 +00:00
|
|
|
mainProgram = "otftrip";
|
|
|
|
inherit (ocaml.meta) platforms;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|