From 331fc30de36b1491c260e6bbab505307a9e6f364 Mon Sep 17 00:00:00 2001 From: Taylor Howard Date: Sat, 4 Apr 2026 21:40:26 +1100 Subject: [PATCH] gamescope: add compatibility patch for stb_image_resize2.h Pulls in a pending upstream patch (ValveSoftware/gamescope#2130) that supports both the old stb_image_resize.h and the new stb_image_resize2.h using __has_include for compile-time detection. This prepares gamescope for the upcoming stb update (NixOS/nixpkgs#491159) which removes stb_image_resize.h in favor of stb_image_resize2.h. Tested against both old stb (0-unstable-2023-01-29) and new stb (0-unstable-2025-10-25) on x86_64-linux and aarch64-linux. Co-Authored-By: Claude Opus 4.6 --- pkgs/by-name/ga/gamescope/package.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/by-name/ga/gamescope/package.nix b/pkgs/by-name/ga/gamescope/package.nix index b47b12849218..575250041433 100644 --- a/pkgs/by-name/ga/gamescope/package.nix +++ b/pkgs/by-name/ga/gamescope/package.nix @@ -92,6 +92,13 @@ stdenv.mkDerivation (finalAttrs: { extraPrefix = "subprojects/wlroots/"; hash = "sha256-q2zekWNn111lX8N938y8HjREvlNMtdCLJ4RveX9z8u8="; }) + + # Pending upstream patch to support stb_image_resize2.h + # See: https://github.com/ValveSoftware/gamescope/pull/2130 + (fetchpatch { + url = "https://github.com/ValveSoftware/gamescope/commit/d49a2aded261030e649fee42ad295f1ef56b736b.diff"; + hash = "sha256-Uh08ZRaV912ZOsl1DMpbVLxIgh4jEXevgihQf2W9KFk="; + }) ]; # We can't substitute the patch itself because substituteAll is itself a derivation,