sdl3: 3.2.20 -> 3.2.22; disable runtime library loading (#439652)
This commit is contained in:
@@ -62,7 +62,7 @@ assert lib.assertMsg (ibusSupport -> dbusSupport) "SDL3 requires dbus support to
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "sdl3";
|
||||
version = "3.2.20";
|
||||
version = "3.2.22";
|
||||
|
||||
outputs = [
|
||||
"lib"
|
||||
@@ -75,7 +75,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
owner = "libsdl-org";
|
||||
repo = "SDL";
|
||||
tag = "release-${finalAttrs.version}";
|
||||
hash = "sha256-ESYjTN2prkAeHcTYurZaWeM3RgEKtwCZrt9gSMcOAe0=";
|
||||
hash = "sha256-4jGfw2hNZTGuae2DMLz8xJBtfNu5abIN5GlNIKDOUpw=";
|
||||
};
|
||||
|
||||
postPatch =
|
||||
@@ -105,23 +105,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
++ lib.optional waylandSupport wayland-scanner;
|
||||
|
||||
buildInputs =
|
||||
finalAttrs.dlopenBuildInputs
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
# error: 'MTLPixelFormatASTC_4x4_LDR' is unavailable: not available on macOS
|
||||
(darwinMinVersionHook "11.0")
|
||||
|
||||
apple-sdk_11
|
||||
]
|
||||
++ lib.optionals ibusSupport [
|
||||
# sdl3 only uses some constants of the ibus headers
|
||||
# it never actually loads the library
|
||||
# thus, it also does not have to care about gtk integration,
|
||||
# so using ibusMinimal avoids an unnecessarily large closure here.
|
||||
ibusMinimal
|
||||
]
|
||||
++ lib.optional waylandSupport zenity;
|
||||
|
||||
dlopenBuildInputs =
|
||||
lib.optionals stdenv.hostPlatform.isLinux [
|
||||
libusb1
|
||||
]
|
||||
@@ -160,7 +143,20 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
vulkan-loader
|
||||
]
|
||||
++ lib.optional (openglSupport && !stdenv.hostPlatform.isDarwin) libGL
|
||||
++ lib.optional x11Support xorg.libX11;
|
||||
++ lib.optional x11Support xorg.libX11
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
# error: 'MTLPixelFormatASTC_4x4_LDR' is unavailable: not available on macOS
|
||||
(darwinMinVersionHook "11.0")
|
||||
|
||||
apple-sdk_11
|
||||
]
|
||||
++ lib.optionals ibusSupport [
|
||||
# sdl3 only uses some constants of the ibus headers
|
||||
# it never actually loads the library
|
||||
# thus, it also does not have to care about gtk integration,
|
||||
# so using ibusMinimal avoids an unnecessarily large closure here.
|
||||
ibusMinimal
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "SDL_ALSA" alsaSupport)
|
||||
@@ -181,21 +177,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
(lib.cmakeBool "SDL_TESTS" true)
|
||||
(lib.cmakeBool "SDL_INSTALL_TESTS" true)
|
||||
(lib.cmakeBool "SDL_DEPS_SHARED" false)
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
# See comment below. We actually *do* need these RPATH entries
|
||||
dontPatchELF = true;
|
||||
|
||||
env = {
|
||||
# Many dependencies are not directly linked to, but dlopen()'d at runtime. Adding them to the RPATH
|
||||
# helps them be found
|
||||
NIX_LDFLAGS = lib.optionalString (
|
||||
stdenv.hostPlatform.hasSharedLibraries && stdenv.hostPlatform.extensions.sharedLibrary == ".so"
|
||||
) "-rpath ${lib.makeLibraryPath (finalAttrs.dlopenBuildInputs)}";
|
||||
};
|
||||
|
||||
postInstall = ''
|
||||
moveToOutput "share/installed-tests" "$installedTests"
|
||||
moveToOutput "libexec/installed-tests" "$installedTests"
|
||||
|
||||
Reference in New Issue
Block a user