From 49cacc1dcd63e0621a55a503dca36eef31ee49d9 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Mon, 5 Jun 2023 14:18:55 +0300 Subject: [PATCH] glfw3: drop libGL on darwin --- pkgs/development/libraries/glfw/3.x.nix | 6 +++--- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/glfw/3.x.nix b/pkgs/development/libraries/glfw/3.x.nix index 1b97bb108a79..15c5e7d9ca58 100644 --- a/pkgs/development/libraries/glfw/3.x.nix +++ b/pkgs/development/libraries/glfw/3.x.nix @@ -1,6 +1,6 @@ { stdenv, lib, fetchFromGitHub, cmake , libGL, libXrandr, libXinerama, libXcursor, libX11, libXi, libXext -, Cocoa, Kernel, fixDarwinDylibNames +, Carbon, Cocoa, Kernel, OpenGL, fixDarwinDylibNames , waylandSupport ? false, extra-cmake-modules, wayland , wayland-protocols, libxkbcommon }: @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { # Fix linkage issues on X11 (https://github.com/NixOS/nixpkgs/issues/142583) patches = lib.optional (!waylandSupport) ./x11.patch; - propagatedBuildInputs = [ libGL ]; + propagatedBuildInputs = [ (if stdenv.isDarwin then OpenGL else libGL) ]; nativeBuildInputs = [ cmake ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { if waylandSupport then [ wayland wayland-protocols libxkbcommon ] else [ libX11 libXrandr libXinerama libXcursor libXi libXext ] - ++ lib.optionals stdenv.isDarwin [ Cocoa Kernel ]; + ++ lib.optionals stdenv.isDarwin [ Carbon Cocoa Kernel ]; cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 349550028226..a359a04a3e79 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20737,7 +20737,7 @@ with pkgs; }; glfw2 = callPackage ../development/libraries/glfw/2.x.nix { }; glfw3 = callPackage ../development/libraries/glfw/3.x.nix { - inherit (darwin.apple_sdk.frameworks) Cocoa Kernel; + inherit (darwin.apple_sdk.frameworks) Carbon Cocoa Kernel OpenGL; }; glibc = callPackage ../development/libraries/glibc {