Skip to content

Conversation

@getchoo
Copy link
Member

@getchoo getchoo commented Oct 16, 2025

This is a big backport of all the improvements we've seen to SDL3 in unstable recently. AFAICT, none have been breaking, but bring pretty big benefits in maintenance, cross compilation, and of course bringing us up to the latest version in stable!

Here's the obligatory list of all PRs backported - and thanks to the original authors of each :)

Also supersedes #425265

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.

Add a 👍 reaction to pull requests you find important.

LordGrimmauld and others added 14 commits October 15, 2025 22:05
(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)
(cherry picked from commit e3f4f34)
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 3a21e96)
Signed-off-by: Marcin Serwin <[email protected]>
(cherry picked from commit bf045ee)
Signed-off-by: Marcin Serwin <[email protected]>
(cherry picked from commit 41c6ba8)
Signed-off-by: Marcin Serwin <[email protected]>
(cherry picked from commit 5685229)
@getchoo getchoo requested a review from a team October 16, 2025 02:23
@getchoo getchoo added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Oct 16, 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 PR / Check / cherry-pick CI workflow.

Some of the commits in this PR require the author's and reviewer's attention.

Sometimes it is not possible to cherry-pick exactly the same patch.
This most frequently happens when resolving merge conflicts.
The range-diff will help to review the resolution of conflicts.

If you need to merge this PR despite the warnings, please dismiss this review shortly before merging.

Warning

Difference between d7d4d3b 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 8bff075 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
  
  let
 @@ pkgs/tools/inputmethods/ibus/default.nix: stdenv.mkDerivation (finalAttrs: {
-     ./build-without-dbus-launch.patch
-   ];
- 
--  outputs = [
--    "out"
--    "dev"
--    "installedTests"
--  ];
-+  outputs =
-+    [
-+      "out"
-+      "dev"
+   outputs = [
+     "out"
+     "dev"
 +  ]
 +  ++ lib.optionals (!libOnly) [
-+      "installedTests"
-+    ];
+     "installedTests"
+   ];
  
-   postPatch = ''
-     # Maintainer does not want to create separate tarballs for final release candidate and release versions,
 @@ pkgs/tools/inputmethods/ibus/default.nix: stdenv.mkDerivation (finalAttrs: {
- 
-   preAutoreconf = "touch ChangeLog";
- 
--  configureFlags = [
--    # The `AX_PROG_{CC,CXX}_FOR_BUILD` autoconf macros can pick up unwrapped GCC binaries,
--    # so we set `{CC,CXX}_FOR_BUILD` to override that behavior.
--    # https://github.com/NixOS/nixpkgs/issues/21751
--    "CC_FOR_BUILD=${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}cc"
--    "CXX_FOR_BUILD=${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}c++"
--    "GLIB_COMPILE_RESOURCES=${lib.getDev buildPackages.glib}/bin/glib-compile-resources"
--    "PKG_CONFIG_VAPIGEN_VAPIGEN=${lib.getBin buildPackages.vala}/bin/vapigen"
--    "--disable-memconf"
+     "GLIB_COMPILE_RESOURCES=${lib.getDev buildPackages.glib}/bin/glib-compile-resources"
+     "PKG_CONFIG_VAPIGEN_VAPIGEN=${lib.getBin buildPackages.vala}/bin/vapigen"
+     "--disable-memconf"
 -    (lib.enableFeature (dconf != null) "dconf")
 -    (lib.enableFeature (libnotify != null) "libnotify")
--    (lib.enableFeature withWayland "wayland")
--    (lib.enableFeature enableUI "ui")
--    "--disable-gtk2"
--    "--enable-gtk4"
--    "--enable-install-tests"
--    "--with-unicode-emoji-dir=${unicode-emoji}/share/unicode/emoji"
--    "--with-emoji-annotation-dir=${cldr-annotations}/share/unicode/cldr/common/annotations"
--    "--with-python=${python3BuildEnv.interpreter}"
--    "--with-ucd-dir=${unicode-character-database}/share/unicode"
--  ];
-+  configureFlags =
-+    [
-+      # The `AX_PROG_{CC,CXX}_FOR_BUILD` autoconf macros can pick up unwrapped GCC binaries,
-+      # so we set `{CC,CXX}_FOR_BUILD` to override that behavior.
-+      # https://github.com/NixOS/nixpkgs/issues/21751
-+      "CC_FOR_BUILD=${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}cc"
-+      "CXX_FOR_BUILD=${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}c++"
-+      "GLIB_COMPILE_RESOURCES=${lib.getDev buildPackages.glib}/bin/glib-compile-resources"
-+      "PKG_CONFIG_VAPIGEN_VAPIGEN=${lib.getBin buildPackages.vala}/bin/vapigen"
-+      "--disable-memconf"
 +    "--disable-gtk2"
 +    "--with-python=${python3BuildEnv.interpreter}"
 +    (lib.enableFeature (!libOnly && dconf != null) "dconf")
 +    (lib.enableFeature (!libOnly && libnotify != null) "libnotify")
-+      (lib.enableFeature withWayland "wayland")
-+      (lib.enableFeature enableUI "ui")
+     (lib.enableFeature withWayland "wayland")
+     (lib.enableFeature enableUI "ui")
+-    "--disable-gtk2"
+-    "--enable-gtk4"
+-    "--enable-install-tests"
 +    (lib.enableFeature (!libOnly) "gtk3")
 +    (lib.enableFeature (!libOnly) "gtk4")
 +    (lib.enableFeature (!libOnly) "xim")
@@ pkgs/tools/inputmethods/ibus/default.nix: stdenv.mkDerivation (finalAttrs: {
 +    (lib.enableFeature (!libOnly) "unicode-dict")
 +  ]
 +  ++ lib.optionals (!libOnly) [
-+      "--with-unicode-emoji-dir=${unicode-emoji}/share/unicode/emoji"
-+      "--with-emoji-annotation-dir=${cldr-annotations}/share/unicode/cldr/common/annotations"
-+      "--with-ucd-dir=${unicode-character-database}/share/unicode"
-+    ];
+     "--with-unicode-emoji-dir=${unicode-emoji}/share/unicode/emoji"
+     "--with-emoji-annotation-dir=${cldr-annotations}/share/unicode/cldr/common/annotations"
+-    "--with-python=${python3BuildEnv.interpreter}"
+     "--with-ucd-dir=${unicode-character-database}/share/unicode"
+   ];
  
 -  makeFlags = [
 +  makeFlags = lib.optionals (!libOnly) [
@@ pkgs/tools/inputmethods/ibus/default.nix: stdenv.mkDerivation (finalAttrs: {
      makeWrapper
      pkg-config
      python3BuildEnv
--      vala
++    glib # required to satisfy AM_PATH_GLIB_2_0
+     vala
 -    wrapGAppsHook3
      dbus-launch
-+      glib # required to satisfy AM_PATH_GLIB_2_0
-+      vala
      gobject-introspection
-     ]
++  ]
 +  ++ lib.optionals (!libOnly) [
 +    wrapGAppsHook3
-+    ]
-     ++ lib.optionals withWayland [
-       wayland-scanner
    ];
+ 
+   propagatedBuildInputs = [
 @@ 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. 4.workflow: backport This targets a stable branch labels Oct 16, 2025
Copy link
Contributor

@marcin-serwin marcin-serwin left a comment

Choose a reason for hiding this comment

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

Diff LGTM

@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 Oct 16, 2025
Copy link
Member

@ttuegel ttuegel left a comment

Choose a reason for hiding this comment

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

The ibus changes look good to me!

@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 Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

7 participants