Skip to content

Commit

Permalink
python3Packages.materialx: enable MSL support on x86_64-darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
reckenrode committed Oct 10, 2024
1 parent e694240 commit 088dce9
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions pkgs/development/python-modules/materialx/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
fetchFromGitHub,
cmake,
setuptools,
darwin,
libX11,
libXt,
libGL,
openimageio,
imath,
python,
darwinMinVersionHook,
apple-sdk_14,
}:

buildPythonPackage rec {
Expand All @@ -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
Expand All @@ -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
))
];

Expand Down

0 comments on commit 088dce9

Please sign in to comment.