From dfa1e4ca37d4b9751806506c79e4403fc6f61fcc Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Tue, 29 Jun 2021 22:35:53 +0300 Subject: [PATCH] SDL: fix wrongly linking to Mesa on Darwin --- pkgs/development/libraries/SDL/default.nix | 5 +++-- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/SDL/default.nix b/pkgs/development/libraries/SDL/default.nix index bf76bc1e8570..225cadac8c60 100644 --- a/pkgs/development/libraries/SDL/default.nix +++ b/pkgs/development/libraries/SDL/default.nix @@ -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; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7107b3f4f9ae..fa594a704d35 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 doesn’t work with Android’s SDL libGLU = null;