python311Packages.openusd: Initial support for x86_64 darwin

I had to disable OSL support as I was getting an error when trying to
link openimageio. I'm sure that this is fixable, but building this
package takes multiple hours on my macbook and I don't have the time to
dig deep into this.
This commit is contained in:
Ashley Ruglys 2024-02-23 15:03:33 +13:00
parent 7e5e0e3c9f
commit 9793a2376b

View file

@ -28,6 +28,7 @@
, bison , bison
, qt6 , qt6
, python , python
, darwin
}: }:
let let
# Matches the pyside6-uic implementation # Matches the pyside6-uic implementation
@ -46,6 +47,11 @@ buildPythonPackage rec {
hash = "sha256-5zQrfB14kXs75WbL3s4eyhxELglhLNxU2L2aVXiyVjg="; hash = "sha256-5zQrfB14kXs75WbL3s4eyhxELglhLNxU2L2aVXiyVjg=";
}; };
stdenv = if python.stdenv.isDarwin then
darwin.apple_sdk_11_0.stdenv
else
python.stdenv;
outputs = ["out" "doc"]; outputs = ["out" "doc"];
format = "other"; format = "other";
@ -72,9 +78,9 @@ buildPythonPackage rec {
"-DPXR_BUILD_PYTHON_DOCUMENTATION=ON" "-DPXR_BUILD_PYTHON_DOCUMENTATION=ON"
"-DPXR_BUILD_EMBREE_PLUGIN=ON" "-DPXR_BUILD_EMBREE_PLUGIN=ON"
"-DPXR_BUILD_ALEMBIC_PLUGIN=ON" "-DPXR_BUILD_ALEMBIC_PLUGIN=ON"
"-DPXR_ENABLE_OSL_SUPPORT=ON"
"-DPXR_BUILD_DRACO_PLUGIN=ON" "-DPXR_BUILD_DRACO_PLUGIN=ON"
"-DPXR_BUILD_MONOLITHIC=ON" # Seems to be commonly linked to monolithically "-DPXR_BUILD_MONOLITHIC=ON" # Seems to be commonly linked to monolithically
(lib.cmakeBool "PXR_ENABLE_OSL_SUPPORT" (!stdenv.isDarwin))
]; ];
nativeBuildInputs = [ nativeBuildInputs = [
@ -100,8 +106,12 @@ buildPythonPackage rec {
boost boost
draco draco
qt6.qtbase qt6.qtbase
qt6.qtwayland ]
]; ++ lib.optionals stdenv.isLinux [ qt6.qtwayland ]
++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk_11_0.frameworks; [
Cocoa
])
;
pythonImportsCheck = [ "pxr" "pxr.Usd" ]; pythonImportsCheck = [ "pxr" "pxr.Usd" ];