-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sdl3: init at 3.1.8 #326699
sdl3: init at 3.1.8 #326699
Conversation
freebsd has the version at 3.1.2, and that version seems to be the case in te rev you've selected as well: |
Looks like these tags were yanked. See libsdl-org/SDL#10367 Quoting from upstream:
Based on this, the package here could be merged as is (though i'll give it a commit rev bump) IMO. An equally good alternative would be waiting for that stable ABI release soon ™️. Feedback welcome :) |
Result of 3 packages built:
|
sorry for the delay. This LGTM for the most part, but i think this expression risks being bumped down to SDL2 by nix-update or r-ryantm. Could you set updateScript? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Configure warns about some things that are still missing:
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR)
[...]
-- Checking for modules 'wayland-client>=1.18;wayland-egl;wayland-cursor;egl;xkbcommon>=0.5.0'
-- No package 'egl' found
[...]
-- Checking for modules 'libunwind;libunwind-generic'
-- No package 'libunwind' found
-- No package 'libunwind-generic' found
-- Checking for module 'libusb-1.0>=1.0.16'
-- No package 'libusb-1.0' found
-- Could NOT find LibUSB (missing: LibUSB_LIBRARY LibUSB_INCLUDE_PATH) (found version "LibUSB_VERSION-NOTFOUND")
I think this also needs the dlopen
workaround from our SDL2 packaging, so sdl3
users don't need to worry about adding all the dlopen
ed dependencies to their LD_LIBRARY_PATH
/ rpath
?
There's also a test subdirectory with tests that we could run via
cmakeFlags = [
(lib.cmakeBool "SDL_TESTS" finalAttrs.finalPackage.doCheck)
];
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
Can we get them working? (Though I don't think sdl2
runs them either, so 🤷♀️)
ca2d556
to
4bd788e
Compare
Sorry for the wait. I've updated upstream's latest preview tag, (hopefully) applied the correct RPATH changes, and made a ton of overrides for build options similar to the current SDL2 package
Is there any example project similar to what you're compiling here we could add to passthru.tests? Would probably help in not tripping this for any future dependency changes
Two are still broken, but I've left the option there for when we eventually figure out how to |
What I was compiling there was the SDL3 package.
I know that
|
There are some changes needed to make it work with wayland:
Patch with the above changesdiff --git a/pkgs/by-name/sd/sdl3/package.nix b/pkgs/by-name/sd/sdl3/package.nix
index cff003e1802f..505272cca80e 100644
--- a/pkgs/by-name/sd/sdl3/package.nix
+++ b/pkgs/by-name/sd/sdl3/package.nix
@@ -28,6 +28,7 @@
wayland,
wayland-scanner,
xorg,
+ zenity,
alsaSupport ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAndroid,
dbusSupport ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAndroid,
drmSupport ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAndroid,
@@ -68,10 +69,11 @@ stdenv.mkDerivation (finalAttrs: {
cmake
ninja
validatePkgConfig
- ];
+ ] ++ lib.optional waylandSupport wayland-scanner;
buildInputs =
finalAttrs.dlopenBuildInputs
+ ++ lib.optional waylandSupport zenity
++ lib.optionals ibusSupport [
fcitx5
ibus
@@ -106,10 +108,9 @@ stdenv.mkDerivation (finalAttrs: {
++ lib.optional sndioSupport sndio
++ lib.optionals waylandSupport [
wayland
- wayland-scanner
+ libxkbcommon
]
++ lib.optionals x11Support [
- libxkbcommon
xorg.libX11
xorg.libXScrnSaver
xorg.libXcursor
@@ -125,6 +126,11 @@ stdenv.mkDerivation (finalAttrs: {
lib.optional (openglSupport && !stdenv.hostPlatform.isDarwin) libGL
++ lib.optional x11Support xorg.libX11;
+ postPatch = lib.optionalString waylandSupport ''
+ substituteInPlace src/video/wayland/SDL_waylandmessagebox.c \
+ --replace-fail '"zenity"' '"${zenity}/bin/zenity"'
+ '';
+
cmakeFlags = [
(lib.cmakeBool "SDL_ALSA" alsaSupport)
(lib.cmakeBool "SDL_DBUS" dbusSupport) |
4bd788e
to
f2ab303
Compare
The snake game example is now built as a separate derivation to test our RPATH hacks, and then run in a VM test |
f2ab303
to
d3f91c1
Compare
|
They cut a new preview release https://github.com/libsdl-org/SDL/releases/tag/preview-3.1.8 which adds tray icon support. It currently requires |
697d0bc
to
31d0e29
Compare
31d0e29
to
f8db37f
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's complete the list of checked platforms:
nixpkgs-review
result
Generated using nixpkgs-review
.
Command: nixpkgs-review pr 326699
x86_64-linux
✅ 3 packages built:
- sdl3
- sdl3.dev
- sdl3.lib
Also built sdl3.passthru.tests
.
At this point, I think we should just send this.
And another preview release 😄 . This time they are calling it the first release candidate. |
At this point it's been almost 6 months, so honestly I'm fine landing this without being on the latest tag and making a follow up, as we've already tested the current rev. Committers feel free to merge :) If no one does, I'll try to bump it in the next couple days and go through the testing/nixpkgs-review process again |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move on with this. We will be able to fix eventual issues in follow-up PRs.
Successfully created backport PR for |
Description of changes
Closes #324694
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.