libglut: add cross‐platform alias

freeglut requires GLX; this allows more packages to work with the
native macOS GLUT framework without conditionals.
This commit is contained in:
Emily 2024-06-20 11:07:30 +01:00
parent 755c400a92
commit c884bc3260

View File

@ -23246,6 +23246,14 @@ with pkgs;
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;
mesa = if stdenv.isDarwin
then darwin.apple_sdk_11_0.callPackage ../development/libraries/mesa/darwin.nix {
inherit (darwin.apple_sdk_11_0.libs) Xplugin;