From d97e83ff6f7e5565d0aa03d15c418e5f43887295 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 12 Aug 2023 22:18:55 +0100 Subject: [PATCH] mangohud: backport gcc-13 fix Without the change the build fails on `gcc-13` as: $ nix build --impure --expr 'with import ./. {}; mangohud.override { stdenv = gcc13Stdenv; }' -L mangohud> In file included from ../tests/../src/amdgpu.h:8, mangohud> from ../tests/test_amdgpu.cpp:9: mangohud> ../tests/../src/overlay_params.h:229:21: error: 'uint32_t' is not a member of 'std'; did you mean 'wint_t'? mangohud> 229 | std::vector fps_limit; mangohud> | ^~~~~~~~ mangohud> | wint_t --- pkgs/tools/graphics/mangohud/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/tools/graphics/mangohud/default.nix b/pkgs/tools/graphics/mangohud/default.nix index 877123951448..e64d2b457ba9 100644 --- a/pkgs/tools/graphics/mangohud/default.nix +++ b/pkgs/tools/graphics/mangohud/default.nix @@ -3,6 +3,7 @@ , fetchFromGitLab , fetchFromGitHub , fetchurl +, fetchpatch , substituteAll , coreutils , curl @@ -123,6 +124,13 @@ stdenv.mkDerivation (finalAttrs: { libdbus = dbus.lib; inherit hwdata; }) + + # Pull gcc-13 build fix for nissing + (fetchpatch { + name = "gcc-13.patch"; + url = "https://github.com/flightlessmango/MangoHud/commit/3f8f036ee8773ae1af23dd0848b6ab487b5ac7de.patch"; + hash = "sha256-qbNywAXAStGiVZ1LA5qZyNp4n28iNUuE4N69zXv2gmM="; + }) ]; postPatch = ''