Unverified Commit a1f6bb2b authored by Ryan Lahfa's avatar Ryan Lahfa Committed by GitHub
Browse files

Merge pull request #290746 from expenses/openusd-macos

python311Packages.openusd: Initial support for x86_64 darwin
parents 746538a8 9793a237
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -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" ];