sdl3: 3.2.28 -> 3.4.0, modernize; sdl2-compat: 2.32.60 -> 2.32.62 (#475854)
This commit is contained in:
@@ -30,13 +30,13 @@ let
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "sdl2-compat";
|
||||
version = "2.32.60";
|
||||
version = "2.32.62";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "libsdl-org";
|
||||
repo = "sdl2-compat";
|
||||
tag = "release-${finalAttrs.version}";
|
||||
hash = "sha256-8nhSyifEeYEZj9tqid1x67jhxqmrR61NwQ/g0Z8vbw8=";
|
||||
hash = "sha256-JYHkc3DyCsKtq8zbwLGsptCrIRDDbHUjlC9rVaEbEzc=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
config,
|
||||
alsa-lib,
|
||||
cmake,
|
||||
darwinMinVersionHook,
|
||||
dbus,
|
||||
fetchFromGitHub,
|
||||
ibusMinimal,
|
||||
@@ -18,6 +17,15 @@
|
||||
libusb1,
|
||||
libxkbcommon,
|
||||
libgbm,
|
||||
libX11,
|
||||
libxcb,
|
||||
libXScrnSaver,
|
||||
libXcursor,
|
||||
libXext,
|
||||
libXfixes,
|
||||
libXi,
|
||||
libXrandr,
|
||||
libxtst,
|
||||
ninja,
|
||||
nix-update-script,
|
||||
nixosTests,
|
||||
@@ -30,7 +38,6 @@
|
||||
vulkan-loader,
|
||||
wayland,
|
||||
wayland-scanner,
|
||||
xorg,
|
||||
zenity,
|
||||
# for passthru.tests
|
||||
SDL_compat,
|
||||
@@ -61,7 +68,7 @@ assert lib.assertMsg (ibusSupport -> dbusSupport) "SDL3 requires dbus support to
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "sdl3";
|
||||
version = "3.2.28";
|
||||
version = "3.4.0";
|
||||
|
||||
outputs = [
|
||||
"lib"
|
||||
@@ -74,7 +81,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
owner = "libsdl-org";
|
||||
repo = "SDL";
|
||||
tag = "release-${finalAttrs.version}";
|
||||
hash = "sha256-nfnvzog1bON2IaBOeWociV82lmRY+qXgdeXBe6GYlww=";
|
||||
hash = "sha256-/A1y/NaZVebzI58F4TlwtDwuzlcA33Y1YuZqd5lz/Sk=";
|
||||
};
|
||||
|
||||
postPatch =
|
||||
@@ -84,7 +91,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
--replace-fail 'set(noninteractive_timeout 10)' 'set(noninteractive_timeout 30)'
|
||||
''
|
||||
+ lib.optionalString waylandSupport ''
|
||||
substituteInPlace src/video/wayland/SDL_waylandmessagebox.c \
|
||||
substituteInPlace src/dialog/unix/SDL_zenitymessagebox.c \
|
||||
--replace-fail '"zenity"' '"${lib.getExe zenity}"'
|
||||
substituteInPlace src/dialog/unix/SDL_zenitydialog.c \
|
||||
--replace-fail '"zenity"' '"${lib.getExe zenity}"'
|
||||
@@ -124,21 +131,20 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
wayland
|
||||
]
|
||||
++ lib.optionals x11Support [
|
||||
xorg.libX11
|
||||
xorg.libxcb
|
||||
xorg.libXScrnSaver
|
||||
xorg.libXcursor
|
||||
xorg.libXext
|
||||
xorg.libXfixes
|
||||
xorg.libXi
|
||||
xorg.libXrandr
|
||||
libX11
|
||||
libxcb
|
||||
libXScrnSaver
|
||||
libXcursor
|
||||
libXext
|
||||
libXfixes
|
||||
libXi
|
||||
libXrandr
|
||||
libxtst
|
||||
]
|
||||
++ [
|
||||
vulkan-headers
|
||||
vulkan-loader
|
||||
]
|
||||
++ lib.optional (openglSupport && !stdenv.hostPlatform.isDarwin) libGL
|
||||
++ lib.optional x11Support xorg.libX11
|
||||
++ lib.optionals ibusSupport [
|
||||
# sdl3 only uses some constants of the ibus headers
|
||||
# it never actually loads the library
|
||||
@@ -170,17 +176,13 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
# Only ppc64le baseline guarantees AltiVec
|
||||
(lib.cmakeBool "SDL_ALTIVEC" (stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian))
|
||||
]
|
||||
++
|
||||
lib.optionals
|
||||
(
|
||||
stdenv.hostPlatform.isUnix
|
||||
&& !(stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isAndroid)
|
||||
&& !(x11Support || waylandSupport)
|
||||
)
|
||||
[
|
||||
(lib.cmakeBool "SDL_UNIX_CONSOLE_BUILD" true)
|
||||
];
|
||||
|
||||
(lib.cmakeBool "SDL_UNIX_CONSOLE_BUILD" (
|
||||
stdenv.hostPlatform.isUnix
|
||||
&& !(stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isAndroid)
|
||||
&& !(x11Support || waylandSupport)
|
||||
))
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
@@ -227,7 +229,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
sdl3-image
|
||||
sdl3-ttf
|
||||
;
|
||||
pkg-config = testers.hasPkgConfigModules { package = finalAttrs.finalPackage; };
|
||||
pkg-config = testers.hasPkgConfigModules {
|
||||
package = finalAttrs.finalPackage;
|
||||
versionCheck = true;
|
||||
};
|
||||
inherit (finalAttrs.passthru) debug-text-example;
|
||||
}
|
||||
// lib.optionalAttrs stdenv.hostPlatform.isLinux {
|
||||
|
||||
Reference in New Issue
Block a user