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