2021-02-05 17:12:51 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, pkg-config, fontconfig, ocaml }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2023-11-16 04:20:00 +00:00
|
|
|
pname = "ocaml${ocaml.version}-fontconfig";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "unstable-2013-11-03";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "flh";
|
|
|
|
repo = "ocaml-fontconfig";
|
|
|
|
rev = "42daf1697ffcee9c89ee4be3103b6427f7a7b7e5";
|
|
|
|
sha256 = "1fw6bzydmnyh2g4x35mcbg0hypnxqhynivk4nakcsx7prr8zr3yh";
|
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
postPatch = lib.optionalString (lib.versionAtLeast ocaml.version "4.03") ''
|
|
|
|
substituteInPlace extract_consts.ml \
|
|
|
|
--replace String.lowercase String.lowercase_ascii \
|
|
|
|
--replace String.capitalize String.capitalize_ascii
|
|
|
|
'';
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ocaml ];
|
|
|
|
buildInputs = [ fontconfig ];
|
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
makeFlags = [
|
2021-01-15 22:18:51 +00:00
|
|
|
"OCAML_STDLIB_DIR=$(out)/lib/ocaml/${lib.getVersion ocaml}/site-lib/"
|
2020-04-24 23:36:52 +00:00
|
|
|
"OCAML_HAVE_OCAMLOPT=yes"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Fontconfig bindings for OCaml";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
2023-11-16 04:20:00 +00:00
|
|
|
platforms = ocaml.meta.platforms;
|
2021-01-15 22:18:51 +00:00
|
|
|
maintainers = with lib.maintainers; [ vbgl ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|