From 22db7a73e4b4145220408222869031df11c5b768 Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Mon, 10 Nov 2025 09:55:48 +0100 Subject: [PATCH] SDL_compat: revert breaking upstream change Fixes several of the build failures that were caused by , e.g.: * https://hydra.nixos.org/build/311791969 * https://hydra.nixos.org/build/311791578 * https://hydra.nixos.org/build/311802072 Signed-off-by: Marcin Serwin --- pkgs/by-name/sd/SDL_compat/package.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/sd/SDL_compat/package.nix b/pkgs/by-name/sd/SDL_compat/package.nix index 737170945a9ff..c47b15a164abf 100644 --- a/pkgs/by-name/sd/SDL_compat/package.nix +++ b/pkgs/by-name/sd/SDL_compat/package.nix @@ -4,6 +4,7 @@ cmake, darwin, fetchFromGitHub, + fetchpatch2, libGLU, libiconv, libX11, @@ -84,10 +85,18 @@ stdenv.mkDerivation (finalAttrs: { ln -s $out/lib/pkgconfig/sdl12_compat.pc $out/lib/pkgconfig/sdl.pc ''; - # The setup hook scans paths of buildInputs to find SDL related packages and - # adds their include and library paths to environment variables. The sdl-config - # is patched to use these variables to produce correct flags for compiler. - patches = [ ./find-headers.patch ]; + patches = [ + # The setup hook scans paths of buildInputs to find SDL related packages and + # adds their include and library paths to environment variables. The sdl-config + # is patched to use these variables to produce correct flags for compiler. + ./find-headers.patch + + # https://github.com/libsdl-org/sdl12-compat/issues/382 + (fetchpatch2 { + url = "https://github.com/libsdl-org/sdl12-compat/commit/bef8f7412dd44edc4f7e14dc35d3b20399e25496.patch?full_index=1"; + hash = "sha256-5kJawjmA8C3uH3OIXHmqQjnIRtoTJtXmm3iLxG3e1qc="; + }) + ]; setupHook = ./setup-hook.sh; passthru.tests = {