Unverified Commit 2970860c authored by Grimmauld's avatar Grimmauld
Browse files

sdl2-compat: Add more relevant passthru tests

`monado` was added in #380523 to show `sdl2-compat` could be used
to build SDL2 programs when `sdl2-compat` was first added.
It is not particularly load-bearing, and because it depends on
OpenCV it is quite expensive to build from source in a world-rebuild.

I propose instead testing `SDL_compat`, `ffmpeg` and `qemu`.
These packages are much more important for nixpkgs as a whole,
either testing SDL, being required for most gui apps, or building VM tests.
`qemu` on darwin does not enable sdl support, so that check is linux-only.
parent 6425d59f
Loading
Loading
Loading
Loading
+13 −7
Original line number Diff line number Diff line
@@ -2,20 +2,24 @@
  cmake,
  lib,
  fetchFromGitHub,
  monado,
  ninja,
  sdl3,
  stdenv,
  testers,
  libX11,
  libGL,
  nix-update-script,

  # passthru tests
  SDL2_ttf,
  SDL2_net,
  SDL2_gfx,
  SDL2_sound,
  SDL2_mixer,
  SDL2_image,
  sdl3,
  stdenv,
  testers,
  libX11,
  libGL,
  SDL_compat,
  ffmpeg,
  qemu,
}:

stdenv.mkDerivation (finalAttrs: {
@@ -76,16 +80,18 @@ stdenv.mkDerivation (finalAttrs: {
        pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;

        inherit
          SDL_compat
          SDL2_ttf
          SDL2_net
          SDL2_gfx
          SDL2_sound
          SDL2_mixer
          SDL2_image
          ffmpeg
          ;
      }
      // lib.optionalAttrs stdenv.hostPlatform.isLinux {
        inherit monado;
        inherit qemu;
      };

    updateScript = nix-update-script {