1 { stdenv, lib, fetchFromGitHub, pkg-config, fontconfig, ocaml }:
4 pname = "ocaml${ocaml.version}-fontconfig";
5 version = "unstable-2013-11-03";
7 src = fetchFromGitHub {
9 repo = "ocaml-fontconfig";
10 rev = "42daf1697ffcee9c89ee4be3103b6427f7a7b7e5";
11 sha256 = "1fw6bzydmnyh2g4x35mcbg0hypnxqhynivk4nakcsx7prr8zr3yh";
14 postPatch = lib.optionalString (lib.versionAtLeast ocaml.version "4.03") ''
15 substituteInPlace extract_consts.ml \
16 --replace String.lowercase String.lowercase_ascii \
17 --replace String.capitalize String.capitalize_ascii
20 nativeBuildInputs = [ pkg-config ocaml ];
21 buildInputs = [ fontconfig ];
26 "OCAML_STDLIB_DIR=$(out)/lib/ocaml/${lib.getVersion ocaml}/site-lib/"
27 "OCAML_HAVE_OCAMLOPT=yes"
31 description = "Fontconfig bindings for OCaml";
32 license = lib.licenses.gpl2Plus;
33 platforms = ocaml.meta.platforms;
34 maintainers = with lib.maintainers; [ vbgl ];