Unverified Commit 68fc06fa authored by Grimmauld's avatar Grimmauld
Browse files

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 (aa8bb539)
parent f7a715c1
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -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