From 088dce914530e9f8df086805eb5a935ad2aac811 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 29 Sep 2024 19:11:11 -0400 Subject: [PATCH] python3Packages.materialx: enable MSL support on x86_64-darwin --- .../python-modules/materialx/default.nix | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/materialx/default.nix b/pkgs/development/python-modules/materialx/default.nix index 0ebcc212617b..2e7af7b89b1f 100644 --- a/pkgs/development/python-modules/materialx/default.nix +++ b/pkgs/development/python-modules/materialx/default.nix @@ -5,13 +5,14 @@ fetchFromGitHub, cmake, setuptools, - darwin, libX11, libXt, libGL, openimageio, imath, python, + darwinMinVersionHook, + apple-sdk_14, }: buildPythonPackage rec { @@ -37,13 +38,10 @@ buildPythonPackage rec { openimageio imath ] - ++ lib.optionals stdenv.hostPlatform.isDarwin ( - with darwin.apple_sdk.frameworks; - [ - OpenGL - Cocoa - ] - ) + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + apple-sdk_14 + (darwinMinVersionHook "10.15") + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ libX11 libXt @@ -53,9 +51,8 @@ buildPythonPackage rec { cmakeFlags = [ (lib.cmakeBool "MATERIALX_BUILD_OIIO" true) (lib.cmakeBool "MATERIALX_BUILD_PYTHON" true) - # don't build MSL shader back-end on x86_x64-darwin, as it requires a newer SDK with metal support (lib.cmakeBool "MATERIALX_BUILD_GEN_MSL" ( - stdenv.hostPlatform.isLinux || (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isDarwin) + stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isDarwin )) ];