Skip to content

gamescope: add stb_image_resize2 compatibility patch#506565

Merged
K900 merged 1 commit into
NixOS:masterfrom
taylorhoward92:gamescope-stb-compat
May 16, 2026
Merged

gamescope: add stb_image_resize2 compatibility patch#506565
K900 merged 1 commit into
NixOS:masterfrom
taylorhoward92:gamescope-stb-compat

Conversation

@taylorhoward92
Copy link
Copy Markdown
Contributor

@taylorhoward92 taylorhoward92 commented Apr 4, 2026

Pulls in a pending upstream patch (ValveSoftware/gamescope#2130) that supports both stb_image_resize.h (old) and stb_image_resize2.h (new) using __has_include for compile-time detection. This prepares gamescope for the stb update in #491159, which removes the deprecated stb_image_resize.h.

The patch is a no-op with the current stb version and will activate the new code path once stb is updated. By landing this compatibility patch first, the stb update becomes safe for gamescope.

CuraEngine was also flagged in #491159 but does not use stb_image_resize.h — it only uses stb_image.h whose API is unchanged. Its current build failure is a pre-existing issue in libarcus (protobuf type mismatch), reproducible on master without any stb changes.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Test details

Tested against both old and new stb on x86_64-linux and aarch64-linux:

  • Old stb (0-unstable-2023-01-29, current master): #else code path exercised, build succeeds on both platforms
  • New stb (0-unstable-2025-10-25, from stb: 0-unstable-2023-01-29 -> 0-unstable-2025-10-26 #491159): #if __has_include code path exercised via gamescope.override { stb = stb-new; }, build succeeds on both platforms
  • gamescope is Linux-only (platforms = lib.platforms.linux), so x86_64-darwin and aarch64-darwin are N/A

@taylorhoward92 taylorhoward92 marked this pull request as draft April 4, 2026 10:42
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 12.first-time contribution This PR is the author's first one; please be gentle! labels Apr 4, 2026
@taylorhoward92 taylorhoward92 marked this pull request as ready for review April 4, 2026 11:16
@K900
Copy link
Copy Markdown
Contributor

K900 commented Apr 4, 2026

Has this been proposed upstream?

@taylorhoward92
Copy link
Copy Markdown
Contributor Author

Has this been proposed upstream?

@K900 no I haven't, I can try that first?

@taylorhoward92
Copy link
Copy Markdown
Contributor Author

Has this been proposed upstream?

@K900 I've opened ValveSoftware/gamescope#2130 to add this to the upstream repo and have updated the patch in this PR to reference it in the mean time.

@nixpkgs-ci nixpkgs-ci Bot removed the 12.first-time contribution This PR is the author's first one; please be gentle! label Apr 13, 2026
@nixpkgs-ci nixpkgs-ci Bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label May 8, 2026
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#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 <noreply@anthropic.com>
@samestep samestep added the 0.kind: ZHF Fixes Fixes during the Zero Hydra Failures (ZHF) campaign label May 15, 2026
@samestep
Copy link
Copy Markdown
Contributor

Rebased to fix the merge conflict (also the hash was wrong for some reason): 331fc30

ZHF: #516381

@samestep
Copy link
Copy Markdown
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review
Commit: 331fc30de36b1491c260e6bbab505307a9e6f364


x86_64-linux

❌ 1 package failed to build:
  • bottles
✅ 5 packages built:
  • bottles-unwrapped
  • gamescope
  • gamescope-wsi
  • nero-umu
  • opengamepadui

@mdaniels5757 mdaniels5757 force-pushed the gamescope-stb-compat branch from f451753 to 331fc30 Compare May 16, 2026 02:24
@nixpkgs-ci nixpkgs-ci Bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label May 16, 2026
@K900 K900 added this pull request to the merge queue May 16, 2026
Merged via the queue into NixOS:master with commit 2a06ee5 May 16, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.kind: ZHF Fixes Fixes during the Zero Hydra Failures (ZHF) campaign 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants