From 9793a2376b01a4d6f130dbe8b0a153b8f4067d9a Mon Sep 17 00:00:00 2001 From: Ashley Ruglys Date: Fri, 23 Feb 2024 15:03:33 +1300 Subject: [PATCH] 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. --- .../python-modules/openusd/default.nix | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/openusd/default.nix b/pkgs/development/python-modules/openusd/default.nix index f97a9f425ecd..590bae1823c9 100644 --- a/pkgs/development/python-modules/openusd/default.nix +++ b/pkgs/development/python-modules/openusd/default.nix @@ -28,6 +28,7 @@ , bison , qt6 , python +, darwin }: let # Matches the pyside6-uic implementation @@ -46,6 +47,11 @@ buildPythonPackage rec { hash = "sha256-5zQrfB14kXs75WbL3s4eyhxELglhLNxU2L2aVXiyVjg="; }; + stdenv = if python.stdenv.isDarwin then + darwin.apple_sdk_11_0.stdenv + else + python.stdenv; + outputs = ["out" "doc"]; format = "other"; @@ -72,9 +78,9 @@ buildPythonPackage rec { "-DPXR_BUILD_PYTHON_DOCUMENTATION=ON" "-DPXR_BUILD_EMBREE_PLUGIN=ON" "-DPXR_BUILD_ALEMBIC_PLUGIN=ON" - "-DPXR_ENABLE_OSL_SUPPORT=ON" "-DPXR_BUILD_DRACO_PLUGIN=ON" "-DPXR_BUILD_MONOLITHIC=ON" # Seems to be commonly linked to monolithically + (lib.cmakeBool "PXR_ENABLE_OSL_SUPPORT" (!stdenv.isDarwin)) ]; nativeBuildInputs = [ @@ -100,8 +106,12 @@ buildPythonPackage rec { boost draco 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" ];