From 44ac0b526313aa0065760cc527b5514008a4f502 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 12 Jan 2025 22:04:17 +0000 Subject: [PATCH] gnome-recipes: fix `gcc-14` build Without the change the build fails as: https://hydra.nixos.org/build/283869507 ../src/gr-cooking-view.c: In function 'gr_cooking_view_stop': /nix/store/y8fxzs8srzd6d74a85zbpssjr8wkj9q4-glib-2.82.1-dev/include/glib-2.0/glib/gmem.h:143:18: error: passing argument 1 of 'g_array_unref' from incompatible pointer type [-Wincompatible-pointer-types] 143 | (destroy) (_ptr); \ | ^~~~ | | | GPtrArray * {aka struct _GPtrArray *} ../src/gr-cooking-view.c:666:9: note: in expansion of macro 'g_clear_pointer' 666 | g_clear_pointer (&view->images, g_array_unref); | ^~~~~~~~~~~~~~~ --- pkgs/by-name/gn/gnome-recipes/package.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/by-name/gn/gnome-recipes/package.nix b/pkgs/by-name/gn/gnome-recipes/package.nix index c2eac8eb8baaf..a3fe050d1dd82 100644 --- a/pkgs/by-name/gn/gnome-recipes/package.nix +++ b/pkgs/by-name/gn/gnome-recipes/package.nix @@ -2,6 +2,7 @@ stdenv, lib, fetchFromGitLab, + fetchpatch, meson, ninja, pkg-config, @@ -35,6 +36,15 @@ stdenv.mkDerivation rec { sha256 = "GyFOwEYmipQdFLtTXn7+NvhDTzxBlOAghr3cZT4QpQw="; }; + patches = [ + # gcc-14 build failure fix + (fetchpatch { + name = "gcc-14.patch"; + url = "https://gitlab.gnome.org/GNOME/recipes/-/commit/c0304675f63a33737b24fdf37e06c6b154a91a31.patch"; + hash = "sha256-YTf4NDwUiU/q96RAXKTO499pW9sPrgh8IvdPBPEnV6Q="; + }) + ]; + nativeBuildInputs = [ meson ninja