From ee4d47df3cd6c03a6de1c0d87f65ef1eeef50aea Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 16 Mar 2025 20:40:25 +0000 Subject: [PATCH] gobject-introspection: pull upstream fix for glibc-2.41 on clang Without the change `webkitgtk` fails to build as: byteswap.h:35: syntax error, unexpected '{', expecting ',' or ';' in '{' at '{' --- .../libraries/gobject-introspection/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/libraries/gobject-introspection/default.nix b/pkgs/development/libraries/gobject-introspection/default.nix index ef4ad0c3af4a8..08673ee1df73c 100644 --- a/pkgs/development/libraries/gobject-introspection/default.nix +++ b/pkgs/development/libraries/gobject-introspection/default.nix @@ -2,6 +2,7 @@ stdenv, lib, fetchurl, + fetchpatch, glib, flex, bison, @@ -67,6 +68,14 @@ stdenv.mkDerivation (finalAttrs: { (replaceVars ./absolute_shlib_path.patch { inherit nixStoreDir; }) + + # Add _Complex support for glibc-2.41: + # https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/519 + (fetchpatch { + name = "complex-clang.patch"; + url = "https://gitlab.gnome.org/GNOME/gobject-introspection/-/commit/2812471365c75ab51347a9101771128f8ab283ab.patch"; + hash = "sha256-MR0tCOVfoAAPUIlT/Y8IYWiz48j1EnhNjUBzvsCUsEI="; + }) ] ++ lib.optionals x11Support [ # Hardcode the cairo shared library path in the Cairo gir shipped with this package.