From f3fca40fd1088d8bd3fe01772ae96148a5339dbc Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 6 Nov 2023 06:10:32 +0100 Subject: [PATCH] =?UTF-8?q?ocamlPackages.fontconfig:=20fix=20build=20with?= =?UTF-8?q?=20OCaml=20=E2=89=A5=205.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/fontconfig/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/development/ocaml-modules/fontconfig/default.nix b/pkgs/development/ocaml-modules/fontconfig/default.nix index 2eca9a4644b5..5d7e5f59b8bd 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 ]; }; }