From eaebf2363adc296de3a88cb7d06559430b9aa277 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 13 Jan 2024 08:30:44 +0000 Subject: [PATCH] waylandpp: pull `gcc-13` fix pending upstream inclusion Without the change downstream projects like `kodi` fail to build on `gcc-13` as: [ 6%] Building CXX object build/events/windows/CMakeFiles/events_windows.dir/GUIViewStateEventLog.cpp.o In file included from /build/source/xbmc/windowing/wayland/Connection.h:13, from /build/source/xbmc/windowing/wayland/Connection.cpp:9: /nix/store/ygbnddg737vq1992xnn57k5j6xjwfkml-waylandpp-1.0.0-dev/include/wayland-client.hpp:167:73: error: 'std::uint32_t' has not been declared 167 | const std::vector& args, std::uint32_t version = 0); | ^~~ In file included from /nix/store/ygbnddg737vq1992xnn57k5j6xjwfkml-waylandpp-1.0.0-dev/include/wayland-client.hpp:768: /nix/store/ygbnddg737vq1992xnn57k5j6xjwfkml-waylandpp-1.0.0-dev/include/wayland-client-protocol.hpp:169:25: error: 'uint32_t' in namespace 'std' does not name a type; did you mean 'wint_t'? 169 | static constexpr std::uint32_t bind_since_version = 1; | ^~~~~~~~ | wint_t --- pkgs/development/libraries/waylandpp/default.nix | 13 +++++++++++++ pkgs/top-level/all-packages.nix | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/waylandpp/default.nix b/pkgs/development/libraries/waylandpp/default.nix index c0b48ea17c6f..551712f89f5f 100644 --- a/pkgs/development/libraries/waylandpp/default.nix +++ b/pkgs/development/libraries/waylandpp/default.nix @@ -1,5 +1,6 @@ { lib, stdenv , fetchFromGitHub +, fetchpatch , cmake , makeFontsConf , pkg-config @@ -24,6 +25,18 @@ stdenv.mkDerivation rec { hash = "sha256-Dw2RnLLyhykikHps1in+euHksO+ERbATbfmbUFOJklg="; }; + patches = [ + # Pull fixes for gcc-13 compatibility: + # https://github.com/NilsBrause/waylandpp/pull/71 + # Without the change `kodi` fails to find `uint32_t` in `waylandpp` + # headers. + (fetchpatch { + name = "gcc-13.patch"; + url = "https://github.com/NilsBrause/waylandpp/commit/3c441910aa25f57df2a4db55f75f5d99cea86620.patch"; + hash = "sha256-bxHMP09zCwUKD0M63C1FqQySAN9hr+7t/DyFDRwdtCo="; + }) + ]; + cmakeFlags = [ "-DCMAKE_INSTALL_DATADIR=${placeholder "dev"}" ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bdfb60fec1fa..518bf1496aea 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25548,9 +25548,9 @@ with pkgs; wayland-protocols = callPackage ../development/libraries/wayland/protocols.nix { }; - waylandpp = pin-to-gcc12-if-gcc13 (callPackage ../development/libraries/waylandpp { + waylandpp = callPackage ../development/libraries/waylandpp { graphviz = graphviz-nox; - }); + }; wcslib = callPackage ../development/libraries/science/astronomy/wcslib { };