Merge pull request #128657 from mikroskeem/darwin-fix-sdl

SDL: fix wrongly linking to Mesa on Darwin
This commit is contained in:
Domen Kožar 2021-06-30 08:37:58 +02:00 committed by GitHub
commit 1b98bbf304
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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

@ -18104,7 +18104,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;