From 2c06bb1950d996762d8e1c17f58d24bdf1df7707 Mon Sep 17 00:00:00 2001 From: ghpzin Date: Tue, 16 Sep 2025 15:36:43 +0300 Subject: [PATCH] yaml-cpp: fix build with gcc15 - add patch from merged upstream PR that adds `include `: https://www.github.com/jbeder/yaml-cpp/pull/1310 https://github.com/jbeder/yaml-cpp/commit/7b469b4220f96fb3d036cf68cd7bd30bd39e61d2 Fixes build failure with gcc15: ``` /build/source/src/emitterutils.cpp:221:11: error: 'uint16_t' was not declared in this scope 221 | std::pair EncodeUTF16SurrogatePair(int codePoint) { | ^~~~~~~~ /build/source/src/emitterutils.cpp:13:1: note: 'uint16_t' is defined in header ''; this is probably fixable by adding '#include ' 12 | #include "yaml-cpp/null.h" +++ |+#include 13 | #include "yaml-cpp/ostream_wrapper.h" ``` --- pkgs/by-name/ya/yaml-cpp/package.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/by-name/ya/yaml-cpp/package.nix b/pkgs/by-name/ya/yaml-cpp/package.nix index fcc02c77bd14..f5940d39333d 100644 --- a/pkgs/by-name/ya/yaml-cpp/package.nix +++ b/pkgs/by-name/ya/yaml-cpp/package.nix @@ -25,6 +25,13 @@ stdenv.mkDerivation rec { url = "https://github.com/jbeder/yaml-cpp/commit/c2680200486572baf8221ba052ef50b58ecd816e.patch"; hash = "sha256-1kXRa+xrAbLEhcJxNV1oGHPmayj1RNIe6dDWXZA3mUA="; }) + # Fix build with gcc15 + # https://github.com/jbeder/yaml-cpp/pull/1310 + (fetchpatch { + name = "yaml-cpp-add-include-cstdint-gcc15.patch"; + url = "https://github.com/jbeder/yaml-cpp/commit/7b469b4220f96fb3d036cf68cd7bd30bd39e61d2.patch"; + hash = "sha256-4Mua6cYD8UR+fJfFeu0fdYVFprsiuF89HvbaTByz9nI="; + }) ]; strictDeps = true;