{libGL,libGLU,libglut}: don’t use deprecated stubs on Darwin

This commit is contained in:
Emily
2025-04-22 22:32:57 +01:00
parent 0320d1937a
commit 4727c8692f
+19 -15
View File
@@ -9785,12 +9785,15 @@ with pkgs;
#
# Android NDK provides an OpenGL implementation, we can just use that.
#
# On macOS, we use the OpenGL framework. Packages that still need GLX
# specifically can pull in libGLX instead. If you have a package that
# should work without X11 but it cant find the library, it may help
# to add the path to `NIX_CFLAGS_COMPILE`:
# On macOS, the SDK provides the OpenGL framework in `stdenv`.
# Packages that still need GLX specifically can pull in `libGLX`
# instead. If you have a package that should work without X11 but it
# cant find the library, it may help to add the path to
# `$NIX_CFLAGS_COMPILE`:
#
# -L${libGL}/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
# preConfigure = ''
# export NIX_CFLAGS_COMPILE+=" -L$SDKROOT/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries"
# '';
#
# If you still cant get it working, please dont hesitate to ping
# @NixOS/darwin-maintainers to ask an expert to take a look.
@@ -9798,25 +9801,26 @@ with pkgs;
if stdenv.hostPlatform.useAndroidPrebuilt then
stdenv
else if stdenv.hostPlatform.isDarwin then
darwin.apple_sdk.frameworks.OpenGL
null
else
libglvnd;
# On macOS, we use the OpenGL framework. Packages that use libGLX on
# macOS may need to depend on mesa_glu directly if this doesnt work.
libGLU = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk.frameworks.OpenGL else mesa_glu;
# On macOS, the SDK provides the OpenGL framework in `stdenv`.
# Packages that use `libGLX` on macOS may need to depend on
# `mesa_glu` directly if this doesnt work.
libGLU = if stdenv.hostPlatform.isDarwin then null else mesa_glu;
# libglvnd does not work (yet?) on macOS.
# `libglvnd` does not work (yet?) on macOS.
libGLX = if stdenv.hostPlatform.isDarwin then mesa else libglvnd;
# On macOS, we use the GLUT framework. Packages that use libGLX on
# macOS may need to depend on freeglut directly if this doesnt work.
libglut = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk.frameworks.GLUT else freeglut;
# On macOS, the SDK provides the GLUT framework in `stdenv`. Packages
# that use `libGLX` on macOS may need to depend on `freeglut`
# directly if this doesnt work.
libglut = if stdenv.hostPlatform.isDarwin then null else freeglut;
mesa =
if stdenv.hostPlatform.isDarwin then
callPackage ../development/libraries/mesa/darwin.nix {
}
callPackage ../development/libraries/mesa/darwin.nix { }
else
callPackage ../development/libraries/mesa { };