mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
python312Packages.torchvision: fix building on darwin
https://hydra.nixos.org/build/278183972 https://hydra.nixos.org/build/278157714
This commit is contained in:
parent
10c03061fc
commit
9cdf604163
@ -1,7 +1,10 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
torch,
|
||||
apple-sdk_13,
|
||||
buildPythonPackage,
|
||||
darwinMinVersionHook,
|
||||
fetchFromGitHub,
|
||||
|
||||
# nativeBuildInputs
|
||||
@ -44,11 +47,20 @@ buildPythonPackage {
|
||||
which
|
||||
] ++ lib.optionals cudaSupport [ cudaPackages.cuda_nvcc ];
|
||||
|
||||
buildInputs = [
|
||||
libjpeg_turbo
|
||||
libpng
|
||||
torch.cxxdev
|
||||
];
|
||||
buildInputs =
|
||||
[
|
||||
libjpeg_turbo
|
||||
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 = [
|
||||
numpy
|
||||
|
Loading…
Reference in New Issue
Block a user