diff options
author | Vincent Laporte <Vincent.Laporte@gmail.com> | 2023-11-06 06:10:32 +0100 |
---|---|---|
committer | Vincent Laporte <vbgl@users.noreply.github.com> | 2023-11-13 05:06:51 +0100 |
commit | f3fca40fd1088d8bd3fe01772ae96148a5339dbc (patch) | |
tree | 5394e5c1510a4d6796a0b86ec9287f2c5b34f5f3 /pkgs/development | |
parent | bcd19c5881747a4f24561fb7d58d0d068192d639 (diff) |
ocamlPackages.fontconfig: fix build with OCaml ≥ 5.0
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/ocaml-modules/fontconfig/default.nix | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/pkgs/development/ocaml-modules/fontconfig/default.nix b/pkgs/development/ocaml-modules/fontconfig/default.nix index 2eca9a4644b5a..5d7e5f59b8bd5 100644 --- a/pkgs/development/ocaml-modules/fontconfig/default.nix +++ b/pkgs/development/ocaml-modules/fontconfig/default.nix @@ -1,7 +1,7 @@ { stdenv, lib, fetchFromGitHub, pkg-config, fontconfig, ocaml }: stdenv.mkDerivation { - pname = "ocaml-fontconfig"; + pname = "ocaml${ocaml.version}-fontconfig"; version = "unstable-2013-11-03"; src = fetchFromGitHub { @@ -11,6 +11,12 @@ stdenv.mkDerivation { 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 ]; buildInputs = [ fontconfig ]; @@ -24,7 +30,7 @@ stdenv.mkDerivation { meta = { description = "Fontconfig bindings for OCaml"; license = lib.licenses.gpl2Plus; - platforms = ocaml.meta.platforms or [ ]; + platforms = ocaml.meta.platforms; maintainers = with lib.maintainers; [ vbgl ]; }; } |