mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
[Backport release-24.11] python312Packages.torchvision: fix building on darwin (#356798)
This commit is contained in:
commit
a6d9a9cf70
@ -1,7 +1,10 @@
|
|||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
|
stdenv,
|
||||||
torch,
|
torch,
|
||||||
|
apple-sdk_13,
|
||||||
buildPythonPackage,
|
buildPythonPackage,
|
||||||
|
darwinMinVersionHook,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
|
|
||||||
# nativeBuildInputs
|
# nativeBuildInputs
|
||||||
@ -44,11 +47,20 @@ buildPythonPackage {
|
|||||||
which
|
which
|
||||||
] ++ lib.optionals cudaSupport [ cudaPackages.cuda_nvcc ];
|
] ++ lib.optionals cudaSupport [ cudaPackages.cuda_nvcc ];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs =
|
||||||
libjpeg_turbo
|
[
|
||||||
libpng
|
libjpeg_turbo
|
||||||
torch.cxxdev
|
libpng
|
||||||
];
|
torch.cxxdev
|
||||||
|
]
|
||||||
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
|
# This should match the SDK used by `torch` above
|
||||||
|
apple-sdk_13
|
||||||
|
|
||||||
|
# error: unknown type name 'MPSGraphCompilationDescriptor'; did you mean 'MPSGraphExecutionDescriptor'?
|
||||||
|
# https://developer.apple.com/documentation/metalperformanceshadersgraph/mpsgraphcompilationdescriptor/
|
||||||
|
(darwinMinVersionHook "12.0")
|
||||||
|
];
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
numpy
|
numpy
|
||||||
|
Loading…
Reference in New Issue
Block a user