Every NixOS host build was failing: nixpkgs' gamescope 3.16.24 no longer takes our patches #328

Merged
enricobuehler merged 2 commits from nixpkgs-bump-gamescope-3-16-25 into main 2026-08-19 11:10:44 +00:00
Owner

The publish tier went red building punktfunk-gamescope-3.16.24:

applying patch 0009-pipewire-destroy-capture-textures-on-the-compositor-.patch
patching file src/steamcompmgr.cpp
Hunk #1 FAILED at 9321.
1 out of 1 hunk FAILED -- saving rejects to file src/steamcompmgr.cpp.rej

Patch 0009 reaps dead capture textures on the compositor thread, and its context is upstream's vblank-driven call site:

// Drive on vblank, not the timer: under VRR the timer starves (page flips re-arm it).
if ( vblank && pipewire_is_streaming() )

Measured against three upstream trees:

gamescope context present?
3.16.24 — what the locked nixpkgs shipped
3.16.25 — current nixos-unstable
master

packaging/gamescope/README.md pins upstream at 5fb8dce4 (3.16.25-11) and gamescope.nix's header records it as checked against 3.16.25 — but the lock still carried a 2026-07-15 nixpkgs shipping 3.16.24, five weeks behind. The earlier patches were already only just holding on: 0004 and 0008 applied at offsets of −51, −48, −35, and one hunk at fuzz 2. 0009 is simply where the drift finally exceeded what patch could reconcile.

This was not a CI-only failure

gamescope.nix patches whatever gamescope the pinned nixpkgs carries, and host.gamescopeHdr defaults true — so every services.punktfunk.host.enable = true build was failing exactly this way, for any NixOS user, before this PR.

The cache tier is what surfaced it. That is precisely what nix.yml's header predicted:

It patches whatever gamescope the pinned nixpkgs carries, so a nixpkgs bump — not a change of ours — is what breaks it, and the first person to find out would be an operator whose system rebuild fails.

…and the reason that tier compiles gamescope on every main push rather than leaving it a dispatch opt-in.

Scope

nixpkgs 753cc8a3 (2026-07-15) → 0ae2bc14 (2026-08-18). Only that node moves — verified programmatically: 8 inputs compared, 1 changed. rust-overlay and bun2nix follow nixpkgs but keep their own revs.

Every package rebuilds against the newer tree, so the nix workflow on this PR is the real test — and the cache tier will build gamescope for real once it lands on main.

Follow-up worth doing separately

This fixes the instance, not the class. The nix channel is the only one that doesn't pin gamescope's srcpunktfunk-gamescope.spec, the PKGBUILD, and build-punktfunk-gamescope.sh all ship 5fb8dce4. Until gamescope.nix pins the same commit, the next nixpkgs move can break this again in either direction, and nix ships a different compositor from every other channel.

The publish tier went red building `punktfunk-gamescope-3.16.24`: ``` applying patch 0009-pipewire-destroy-capture-textures-on-the-compositor-.patch patching file src/steamcompmgr.cpp Hunk #1 FAILED at 9321. 1 out of 1 hunk FAILED -- saving rejects to file src/steamcompmgr.cpp.rej ``` Patch 0009 reaps dead capture textures on the compositor thread, and its context is upstream's **vblank-driven** call site: ```cpp // Drive on vblank, not the timer: under VRR the timer starves (page flips re-arm it). if ( vblank && pipewire_is_streaming() ) ``` Measured against three upstream trees: | gamescope | context present? | |---|---| | **3.16.24** — what the locked nixpkgs shipped | ❌ | | **3.16.25** — current nixos-unstable | ✅ | | **master** | ✅ | `packaging/gamescope/README.md` pins upstream at `5fb8dce4` (3.16.25-11) and `gamescope.nix`'s header records it as checked against **3.16.25** — but the lock still carried a **2026-07-15** nixpkgs shipping 3.16.24, five weeks behind. The earlier patches were already only just holding on: 0004 and 0008 applied at offsets of −51, −48, −35, and one hunk at *fuzz 2*. 0009 is simply where the drift finally exceeded what `patch` could reconcile. ## This was not a CI-only failure `gamescope.nix` patches whatever gamescope the pinned nixpkgs carries, and `host.gamescopeHdr` **defaults true** — so every `services.punktfunk.host.enable = true` build was failing exactly this way, for any NixOS user, before this PR. The cache tier is what surfaced it. That is precisely what `nix.yml`'s header predicted: > It patches whatever gamescope the pinned nixpkgs carries, so a nixpkgs bump — not a change of ours — is what breaks it, and the first person to find out would be an operator whose system rebuild fails. …and the reason that tier compiles gamescope on every main push rather than leaving it a dispatch opt-in. ## Scope `nixpkgs` `753cc8a3` (2026-07-15) → `0ae2bc14` (2026-08-18). **Only that node moves** — verified programmatically: 8 inputs compared, 1 changed. `rust-overlay` and `bun2nix` follow nixpkgs but keep their own revs. Every package rebuilds against the newer tree, so the nix workflow on this PR is the real test — and the `cache` tier will build gamescope for real once it lands on main. ## Follow-up worth doing separately This fixes the instance, not the class. **The nix channel is the only one that doesn't pin gamescope's `src`** — `punktfunk-gamescope.spec`, the `PKGBUILD`, and `build-punktfunk-gamescope.sh` all ship `5fb8dce4`. Until `gamescope.nix` pins the same commit, the next nixpkgs move can break this again in either direction, and nix ships a different compositor from every other channel.
enricobuehler added 1 commit 2026-08-19 10:30:09 +00:00
fix(nix): bump nixpkgs — its gamescope 3.16.24 no longer takes our patches
ci / bun-nix (pull_request) Successful in 23s
ci / web (pull_request) Successful in 1m12s
ci / docs-site (pull_request) Successful in 1m13s
ci / rust-arm64 (pull_request) Successful in 1m29s
ci / rust (pull_request) Successful in 5m31s
nix / flake (pull_request) Failing after 11m25s
6bec7c7cc6
The publish tier went red on punktfunk-gamescope-3.16.24:

    patching file src/steamcompmgr.cpp
    Hunk #1 FAILED at 9321.
    1 out of 1 hunk FAILED -- saving rejects to src/steamcompmgr.cpp.rej

0009 rewrites the pipewire call site so dead capture textures are reaped on the
compositor thread, and its context is upstream's vblank-driven form:

    // Drive on vblank, not the timer: under VRR the timer starves (page flips re-arm it).
    if ( vblank && pipewire_is_streaming() )

MEASURED against three upstream trees: that context is absent from the 3.16.24
tag and present in both 3.16.25 and master. packaging/gamescope/README.md pins
upstream at 5fb8dce4 (3.16.25-11) and gamescope.nix's header says it was checked
against 3.16.25 — but the lock still carried a 2026-07-15 nixpkgs shipping
3.16.24, five weeks behind. The earlier patches were already only just holding
on: 0004 and 0008 applied at offsets of -51, -48, -35, and one hunk at fuzz 2.

This is not a CI-only failure. gamescope.nix patches whatever gamescope the
pinned nixpkgs carries, and host.gamescopeHdr defaults true, so every
`services.punktfunk.host.enable = true` build was failing the same way. The
cache tier is what surfaced it — exactly what nix.yml's header predicted would
happen, and the reason that tier compiles gamescope on every main push.

Only the nixpkgs node moves (verified: 8 inputs compared, 1 changed).

NOTE: this fixes the instance, not the class. The nix channel is the only one
that does not pin gamescope's src — the RPM spec, the PKGBUILD and
build-punktfunk-gamescope.sh all ship 5fb8dce4 — so the next nixpkgs move can
break it again in either direction.
enricobuehler added 1 commit 2026-08-19 10:56:47 +00:00
fix(nix): the dispatch opt-ins skipped silently on an API dispatch
ci / bun-nix (pull_request) Successful in 19s
ci / web (pull_request) Successful in 1m9s
ci / docs-site (pull_request) Successful in 1m19s
ci / rust-arm64 (pull_request) Successful in 1m32s
ci / rust (pull_request) Successful in 5m20s
nix / flake (pull_request) Failing after 10m59s
1b52942bf8
`build-rust` / `build-gamescope` were compared only against the STRING 'true'.
A checkbox from the Gitea UI arrives that way, but an API dispatch can deliver a
real JSON boolean, and the comparison then misses — the step is skipped, the job
still reports success, and the log is indistinguishable from a run that had
nothing to do.

MEASURED 2026-08-19: dispatched with build-gamescope=true to verify the flake.lock
bump actually fixes the gamescope patch set. Run 19320 went green with 'Build the
patched gamescope' SKIPPED — a green that proved nothing about the one package
being fixed, on the exact check the header recommends before merging a lock bump.

Accepts both shapes now. Deliberately still no `inputs.*`: that context is what
Gitea's parser is least reliable about, which is why this file used
github.event.inputs in the first place.
enricobuehler merged commit 9a29eb4a7a into main 2026-08-19 11:10:44 +00:00
enricobuehler deleted branch nixpkgs-bump-gamescope-3-16-25 2026-08-19 11:10:50 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unom/punktfunk#328