about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/ocaml-modules/otfm/default.nix
blob: c7b9d930bd6f073ee8c43ba814ec7764f4af7b02 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uutf }:

let
  pname = "otfm";
  version = "0.4.0";
  webpage = "https://erratique.ch/software/${pname}";
in

stdenv.mkDerivation {

  pname = "ocaml${ocaml.version}-${pname}";
  inherit version;

  src = fetchurl {
    url = "${webpage}/releases/${pname}-${version}.tbz";
    hash = "sha256-02U23mYTy0ZJgSObDoyygPTGEMC4/Zge5bux4wshaEE=";
  };

  nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ];
  buildInputs = [ topkg ];

  propagatedBuildInputs = [ uutf ];

  strictDeps = true;

  inherit (topkg) buildPhase installPhase;

  meta = with lib; {
    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 ];
    mainProgram = "otftrip";
    inherit (ocaml.meta) platforms;
  };
}