From c884bc326059d8a018549decb0079296b6972eeb Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 20 Jun 2024 11:07:30 +0100 Subject: [PATCH] =?UTF-8?q?libglut:=20add=20cross=E2=80=90platform=20alias?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit freeglut requires GLX; this allows more packages to work with the native macOS GLUT framework without conditionals. --- pkgs/top-level/all-packages.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c10805a5b3f6..ab6f385848ec 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 doesn’t 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;