sdl2-compat: symlink package config specification file into sdl2.pc

Previously, replacing SDL2 with sdl2-compat with dependents on the SDL2 pkgconfig file would just break.
An example for this breakage is pkgs.ffmpeg.override { SDL2 = pkgs.sdl2-compat; }.
This is fixed by symlinking the missing sdl2.pc file to point to sdl2_compat.pc.

This is analogous to #388304 (aa8bb53991)
This commit is contained in:
Grimmauld
2025-03-26 10:36:30 +01:00
parent f7a715c19a
commit 68fc06fa64
+7 -3
View File
@@ -40,9 +40,7 @@ stdenv.mkDerivation (finalAttrs: {
libX11
];
checkInputs = [
libGL
];
checkInputs = [ libGL ];
outputs = [
"out"
@@ -67,6 +65,12 @@ stdenv.mkDerivation (finalAttrs: {
patches = [ ./find-headers.patch ];
setupHook = ./setup-hook.sh;
postFixup = ''
# allow as a drop in replacement for SDL2
# Can be removed after treewide switch from pkg-config to pkgconf
ln -s $dev/lib/pkgconfig/sdl2_compat.pc $dev/lib/pkgconfig/sdl2.pc
'';
passthru = {
tests =
let