SDL: fix wrongly linking to Mesa on Darwin

This commit is contained in:
Mark Vainomaa 2021-06-29 22:35:53 +03:00
parent 34d960aecb
commit dfa1e4ca37
No known key found for this signature in database
GPG key ID: 1B3F9523B542D315
2 changed files with 4 additions and 3 deletions

View file

@ -5,7 +5,7 @@
, x11Support ? !stdenv.isCygwin && !stdenv.hostPlatform.isAndroid
, libXext, libICE, libXrandr
, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux && !stdenv.hostPlatform.isAndroid, libpulseaudio
, OpenGL, CoreAudio, CoreServices, AudioUnit, Kernel, Cocoa
, OpenGL, GLUT, CoreAudio, CoreServices, AudioUnit, Kernel, Cocoa
}:
# NOTE: When editing this expression see if the same change applies to
@ -16,7 +16,8 @@ with lib;
let
extraPropagatedBuildInputs = [ ]
++ optionals x11Support [ libXext libICE libXrandr ]
++ optionals openglSupport [ libGL libGLU ]
++ optionals (openglSupport && stdenv.isLinux) [ libGL libGLU ]
++ optionals (openglSupport && stdenv.isDarwin) [ OpenGL GLUT ]
++ optional alsaSupport alsa-lib
++ optional pulseaudioSupport libpulseaudio
++ optional stdenv.isDarwin Cocoa;

View file

@ -18102,7 +18102,7 @@ in
};
SDL = callPackage ../development/libraries/SDL ({
inherit (darwin.apple_sdk.frameworks) OpenGL CoreAudio CoreServices AudioUnit Kernel Cocoa;
inherit (darwin.apple_sdk.frameworks) OpenGL CoreAudio CoreServices AudioUnit Kernel Cocoa GLUT;
} // lib.optionalAttrs stdenv.hostPlatform.isAndroid {
# libGLU doesnt work with Androids SDL
libGLU = null;