sdl2-compat: specify as compatible with all platforms

The SDL library has backends for many platforms, not just unix ones,
however, it's currently restricted by its dependencies.
This commit is contained in:
Marcin Serwin
2025-03-13 21:07:59 +01:00
parent 67cc93c902
commit 8ce347392b
+5 -11
View File
@@ -44,22 +44,16 @@ stdenv.mkDerivation (finalAttrs: {
outputBin = "dev";
# SDL3 is dlopened at runtime, leave it in runpath
dontPatchELF = true;
cmakeFlags = [
(lib.cmakeBool "SDL2COMPAT_TESTS" finalAttrs.finalPackage.doCheck)
(lib.cmakeFeature "CMAKE_INSTALL_RPATH" (lib.makeLibraryPath [ sdl3 ]))
];
doCheck = testSupport && stdenv.buildPlatform.canExecute stdenv.hostPlatform;
postFixup =
if stdenv.hostPlatform.isDarwin then
''
install_name_tool -add_rpath ${lib.makeLibraryPath [ sdl3 ]} $out/lib/libSDL2.dylib
''
else
''
patchelf --add-rpath ${lib.makeLibraryPath [ sdl3 ]} $out/lib/libSDL2.so
'';
patches = [ ./find-headers.patch ];
setupHook = ./setup-hook.sh;
@@ -95,7 +89,7 @@ stdenv.mkDerivation (finalAttrs: {
changelog = "https://github.com/libsdl-org/sdl2-compat/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.zlib;
maintainers = with lib.maintainers; [ nadiaholmquist ];
platforms = lib.platforms.unix;
platforms = lib.platforms.all;
pkgConfigModules = [ "sdl2_compat" ];
};
})