mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
ocamlPackages.fontconfig: fix build with OCaml ≥ 5.0
This commit is contained in:
parent
bcd19c5881
commit
f3fca40fd1
@ -1,7 +1,7 @@
|
|||||||
{ stdenv, lib, fetchFromGitHub, pkg-config, fontconfig, ocaml }:
|
{ stdenv, lib, fetchFromGitHub, pkg-config, fontconfig, ocaml }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
pname = "ocaml-fontconfig";
|
pname = "ocaml${ocaml.version}-fontconfig";
|
||||||
version = "unstable-2013-11-03";
|
version = "unstable-2013-11-03";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -11,6 +11,12 @@ stdenv.mkDerivation {
|
|||||||
sha256 = "1fw6bzydmnyh2g4x35mcbg0hypnxqhynivk4nakcsx7prr8zr3yh";
|
sha256 = "1fw6bzydmnyh2g4x35mcbg0hypnxqhynivk4nakcsx7prr8zr3yh";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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
|
||||||
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config ocaml ];
|
nativeBuildInputs = [ pkg-config ocaml ];
|
||||||
buildInputs = [ fontconfig ];
|
buildInputs = [ fontconfig ];
|
||||||
|
|
||||||
@ -24,7 +30,7 @@ stdenv.mkDerivation {
|
|||||||
meta = {
|
meta = {
|
||||||
description = "Fontconfig bindings for OCaml";
|
description = "Fontconfig bindings for OCaml";
|
||||||
license = lib.licenses.gpl2Plus;
|
license = lib.licenses.gpl2Plus;
|
||||||
platforms = ocaml.meta.platforms or [ ];
|
platforms = ocaml.meta.platforms;
|
||||||
maintainers = with lib.maintainers; [ vbgl ];
|
maintainers = with lib.maintainers; [ vbgl ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user