[25.05] sdl3: 3.2.20 -> 3.2.24, cleanup deps#452455
Conversation
(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)
(cherry picked from commit 3f9410e)
(cherry picked from commit 9539fbd)
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 <marcin@serwin.dev> (cherry picked from commit bf045ee)
Signed-off-by: Marcin Serwin <marcin@serwin.dev> (cherry picked from commit 41c6ba8)
Signed-off-by: Marcin Serwin <marcin@serwin.dev> (cherry picked from commit 5685229)
Changes: https://github.com/libsdl-org/SDL/releases/tag/release-3.2.24 (cherry picked from commit ba18d82)
There was a problem hiding this comment.
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.
ttuegel
left a comment
There was a problem hiding this comment.
The ibus changes look good to me!
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
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.