sdl2-compat: simplify doCheck logic

`stdenv.mkDerivation` already checks whether the build platform can
execute host code and disables tests if it's not supported, no need to
duplicate this logic. `doCheck` can be disabled with `overrideAttrs`, no
need for a dedicated override flag.
This commit is contained in:
Marcin Serwin
2025-05-07 20:31:48 +02:00
parent 7c848b0739
commit 6753ce53f1
+1 -2
View File
@@ -16,7 +16,6 @@
testers,
libX11,
libGL,
testSupport ? true,
}:
stdenv.mkDerivation (finalAttrs: {
@@ -60,7 +59,7 @@ stdenv.mkDerivation (finalAttrs: {
# skip timing-based tests as those are flaky
env.SDL_TESTS_QUICK = 1;
doCheck = testSupport && stdenv.buildPlatform.canExecute stdenv.hostPlatform;
doCheck = true;
patches = [ ./find-headers.patch ];
setupHook = ./setup-hook.sh;