Skip to content

[Backport staging-25.05] sdl3: 3.2.14 -> 3.2.16; cleanup dependencies; fix cross compilation#425265

Closed
getchoo wants to merge 11 commits intoNixOS:staging-25.05from
getchoo-contrib:backport/sdl3/3.2.16
Closed

[Backport staging-25.05] sdl3: 3.2.14 -> 3.2.16; cleanup dependencies; fix cross compilation#425265
getchoo wants to merge 11 commits intoNixOS:staging-25.05from
getchoo-contrib:backport/sdl3/3.2.16

Conversation

@getchoo
Copy link
Member

@getchoo getchoo commented Jul 15, 2025

This brings an update and some nice cross-related improvements from the following PRs:

#408880
#413222
#414169
#414472 (partial)
#418644
#418646

Built sdl3.passthru.tests against release-25.05
$ nix-build -A sdl3.passthru.tests
/nix/store/m1563yphzjvg9gmgxbap7sbk9cz0qgxl-SDL2_gfx-1.0.4
/nix/store/d6dv4244l5cyd8wk7dsnc4sxq8n43iwg-SDL2_image-2.8.8
/nix/store/rz7zhdc41zpgfnzxq2rzpbs228in6fpf-SDL2_mixer-2.8.1
/nix/store/jllli5ywagab2q57mk2f7zaswm51009k-SDL2_net-2.2.0
/nix/store/10s02nnnbaprkrssidspv9f6wmsnpdvh-SDL2_sound-2.0.1
/nix/store/33425j1k1s8z9pdknvvw5vxnjkgyj7f5-SDL2_ttf-2.24.0
/nix/store/rqf0rp1zzzvp141ihs5kv4549sy1rg19-SDL_compat-1.2.68
/nix/store/j3x7kkv9w2sl9qdprsm9s97g7f5xq1ab-SDL_image-1.2.12-unstable-2025-04-27
/nix/store/x6qy5rdcs0hbzhcf8cky7y0pzpxm3y5f-SDL_mixer-1.2.12
/nix/store/95yfznchla91mfd05iy2pbfagr6a6rlh-SDL_sound-1.0.3
/nix/store/965dnbn0rdxfj00bfl2glm1j8a9a5jx4-SDL_ttf-2.0.11-unstable-2024-04-23
/nix/store/hqjrwyj61pi6mjlx53b04w687p4a73qz-sdl3-debug-text-example-3.2.16
/nix/store/f6az3m5dy4nfhr4xf3bdhcv3ss34cny3-dosbox-0.74-3
/nix/store/jqlw0wbpynm0q6a1zb67vad361n44si0-monado-25.0.0
/nix/store/0xqhn8k2a6blnijjxhppdadciyib3pzj-vm-test-run-sdl3
/nix/store/6bvrfq2nxk3313v5sb2k1w3715m426r9-check-pkg-config-sdl3
/nix/store/8105jl7nw916xdmihzqsz7z4pmgvmy67-sdl2-compat-2.32.56
/nix/store/vjpjll15blfn11qz60pryap78h0g5mca-sdl3-image-3.2.4-lib
/nix/store/4cl3vxjcdwlk47hzhmv8aqypfaia4fsp-sdl3-ttf-3.2.2

Thanks to @LordGrimmauld for most of these patches. CC @NixOS/sdl

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • Nixpkgs 25.11 Release Notes (or backporting 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 25.05 NixOS Release notes)
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other contributing documentation in corresponding paths.

Add a 👍 reaction to pull requests you find important.

pbsds and others added 11 commits July 14, 2025 22:06
(cherry picked from commit 1771f3a)
Motivation: `ibus` carries lots of dependencies on various versions of gtk.
These dependencies become transitive dependencies for sdl3, which causes
quite expensive compiles in the sdl3 closure. Particularly, this means gtk
(and, in turn, gstreamer and everything else) become part of e.g. ffmpeg.

`sdl3` itself uses ibus almost exclusively via dbus, and reimplements some
of the most important features. It does depend on ibus only to use some
of the constants defined in headers. It does not actually load ibus libraries.

This means, as long as the headers are identical, all the gtk dependencies
can be removed in the ibus for sdl3. This requires this split.

(cherry picked from commit 8b825b2)
`sdl3` only relies on constant definitions in the ibus headers,
which does not require ibus to be compiled with gtk support.
This means we can shrink the unnecessarily large closure.

(cherry picked from commit 2533354)
Release notes: https://github.com/libsdl-org/SDL/releases/tag/release-3.2.16
Diff: libsdl-org/SDL@release-3.2.14...release-3.2.16

Mostly bugfixes, most of which only relevant for windows, xbox or android.

Some details about (linux) audio changed, specifically how device leases work.
`ffplay` still plays audio just fine, so nothing seems broken.

(cherry picked from commit 7219e88)
The `installedTests` contains various test binaries,
some of which only useful on a running system.
Motivation for providing this output is to eventually test
tray support in a VM test, which needs a running dbus session.

(cherry picked from commit 73f255a)
(cherry picked from commit d83ebe1)
zenity is used not only for error reporting, but also for file
dialogs if dbus is disabled/unavailable. This needs a patched path too.

(cherry picked from commit 9149a3a)
(cherry picked from commit e3f4f34)
(cherry picked from commit 3a21e96)
@getchoo getchoo added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Jul 15, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This report is automatically generated by the check-cherry-picks CI workflow.

Some of the commits in this PR have not been cherry-picked exactly and require the author's and reviewer's attention.

Please make sure to follow the backporting guidelines and cherry-pick with the -x flag. This requires changes to go to the unstable branches (master / staging) first, before backporting them.

Occasionally, it is not possible to cherry-pick exactly the same patch. This most frequently happens when resolving merge conflicts while cherry-picking or when updating minor versions of packages which have already advanced to the next major on unstable. If you need to merge this PR despite the warnings, please dismiss this review.

Warning

Difference between 47a3fba and original 1771f3a may warrant inspection.

Show diff
@@ Metadata
  ## Commit message ##
     ibus: modernize
 
+    (cherry picked from commit 1771f3a821490c2e0ded1bfff948b591c18ed7e6)
+
  ## pkgs/tools/inputmethods/ibus/default.nix ##
 @@
    buildPackages,
@@ pkgs/tools/inputmethods/ibus/default.nix: let
 -stdenv.mkDerivation rec {
 +stdenv.mkDerivation (finalAttrs: {
    pname = "ibus";
-   version = "1.5.32";
+   version = "1.5.31";
  
    src = fetchFromGitHub {
      owner = "ibus";
      repo = "ibus";
--    tag = version;
+-    rev = version;
+-    sha256 = "sha256-YMCtLIK/9iUdS37Oiow7WMhFFPKhomNXvzWbLzlUkdQ=";
 +    tag = finalAttrs.version;
-     hash = "sha256-Rp2Aw2C2LXMBp8++pnZtPHiPoFDERpkDsKd0E//twuY=";
++    hash = "sha256-YMCtLIK/9iUdS37Oiow7WMhFFPKhomNXvzWbLzlUkdQ=";
    };
  
+   patches = [
 @@ pkgs/tools/inputmethods/ibus/default.nix: stdenv.mkDerivation rec {
      ];
  

Warning

Difference between 6bd3319 and original 8b825b2 may warrant inspection.

Show diff
@@ Commit message
     This means, as long as the headers are identical, all the gtk dependencies
     can be removed in the ibus for sdl3. This requires this split.
 
+    (cherry picked from commit 8b825b220a969c42a4d6e00927e8022c49dd7640)
+
  ## pkgs/by-name/ib/ibusMinimal/package.nix (new) ##
 @@
 +{ ibus }: ibus.override { libOnly = true; }
@@ pkgs/tools/inputmethods/ibus/default.nix
 +  withWayland ? !libOnly,
    libxkbcommon,
    wayland,
-   wayland-protocols,
+   buildPackages,
 @@
    nixosTests,
    versionCheckHook,
@@ pkgs/tools/inputmethods/ibus/default.nix: stdenv.mkDerivation (finalAttrs: {
      "test_sourcesdir=${placeholder "installedTests"}/share/installed-tests/ibus"
    ];
 @@ pkgs/tools/inputmethods/ibus/default.nix: stdenv.mkDerivation (finalAttrs: {
-       makeWrapper
-       pkg-config
-       python3BuildEnv
--      vala
--      wrapGAppsHook3
-       dbus-launch
+     pkg-config
+   ];
+ 
+-  nativeBuildInputs = [
+-    autoreconfHook
+-    gtk-doc
+-    gettext
+-    makeWrapper
+-    pkg-config
+-    python3BuildEnv
+-    vala
+-    wrapGAppsHook3
+-    dbus-launch
+-    gobject-introspection
+-  ];
++  nativeBuildInputs =
++    [
++      autoreconfHook
++      gtk-doc
++      gettext
++      makeWrapper
++      pkg-config
++      python3BuildEnv
++      dbus-launch
 +      glib # required to satisfy AM_PATH_GLIB_2_0
 +      vala
-       gobject-introspection
-     ]
++      gobject-introspection
++    ]
 +    ++ lib.optionals (!libOnly) [
 +      wrapGAppsHook3
-+    ]
-     ++ lib.optionals withWayland [
-       wayland-scanner
-     ];
++    ];
+ 
+   propagatedBuildInputs = [
+     glib
 @@ pkgs/tools/inputmethods/ibus/default.nix: stdenv.mkDerivation (finalAttrs: {
        dbus
        systemd

Hint: The full diffs are also available in the runner logs with slightly better highlighting.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 2501-5000 This PR causes many rebuilds on Linux and should target the staging branches. 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. labels Jul 15, 2025
@nix-owners nix-owners bot requested review from LordGrimmauld and ttuegel July 15, 2025 02:16
@nixpkgs-ci nixpkgs-ci bot added the 4.workflow: backport This targets a stable branch label Jul 15, 2025
@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Jul 15, 2025
@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Jul 15, 2025
@LordGrimmauld
Copy link
Contributor

Hm, seems there are merge conflicts now?

@nixpkgs-ci nixpkgs-ci bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Jul 26, 2025
@vcunat
Copy link
Member

vcunat commented Jul 29, 2025

It's mass reformatting again.

@marcin-serwin marcin-serwin mentioned this pull request Aug 7, 2025
13 tasks
@pbsds
Copy link
Member

pbsds commented Aug 10, 2025

please rebase, the bump commit may likely now be dropped. I have access to a darwin builder again so I can test and merge now. :)

@getchoo getchoo closed this Oct 16, 2025
@getchoo getchoo deleted the backport/sdl3/3.2.16 branch October 16, 2025 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: merge conflict This PR has merge conflicts with the target branch 4.workflow: backport This targets a stable branch 6.topic: cross-compilation Building packages on a different platform than they will be used on 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 2501-5000 This PR causes many rebuilds on Linux and should target the staging branches. 12.approvals: 2 This PR was reviewed and approved by two persons. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants