anchor.diff:    configureFlags = [
       "--disable-oss"
     ] ++ optional (!x11Support) "--without-x"
  -    ++ optional alsaSupport "--with-alsa-prefix=${alsa-lib.out}/lib"
  -    ++ optional stdenv.targetPlatform.isWindows "--disable-video-opengles"
  -    ++ optional stdenv.isDarwin "--disable-sdltest";
  +  ++ optional alsaSupport "--with-alsa-prefix=${alsa-lib.out}/lib"
  +  ++ optional stdenv.targetPlatform.isWindows "--disable-video-opengles"
  +  ++ optional stdenv.isDarwin "--disable-sdltest";
   
     # We remove libtool .la files when static libs are requested,
     # because they make the builds of downstream libs like `SDL_tff`
  
positive.code: { lib, stdenv, config, fetchurl, pkg-config
  , libGLSupported ? lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms
  , openglSupport ? libGLSupported, libGL
  , alsaSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid, alsa-lib
  , x11Support ? !stdenv.targetPlatform.isWindows && !stdenv.hostPlatform.isAndroid
  , libX11, xorgproto, libICE, libXi, libXScrnSaver, libXcursor
  , libXinerama, libXext, libXxf86vm, libXrandr
  , waylandSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid
  , wayland, wayland-protocols, libxkbcommon
  , dbusSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid, dbus
  , udevSupport ? false, udev
  , ibusSupport ? false, ibus
  , fcitxSupport ? false, fcitx
  , pulseaudioSupport ? config.pulseaudio or stdenv.isLinux && !stdenv.hostPlatform.isAndroid
  , libpulseaudio
  , AudioUnit, Cocoa, CoreAudio, CoreServices, ForceFeedback, OpenGL
  , audiofile, libiconv
  , withStatic ? false
  }:
  
  
negative.code:   #
    # You can grep SDL sources with `grep -rE 'SDL_(NAME|.*_SYM)'` to
    # list the symbols used in this way.
    postFixup =
      let
        rpath = makeLibraryPath (dlopenPropagatedBuildInputs ++ dlopenBuildInputs);
      in
      optionalString (stdenv.hostPlatform.extensions.sharedLibrary == ".so") ''
        for lib in $out/lib/*.so* ; do
          if ! [[ -L "$lib" ]]; then
            patchelf --set-rpath "$(patchelf --print-rpath $lib):${rpath}" "$lib"
          fi
        done
      '';
  
    setupHook = ./setup-hook.sh;
  
  