diff --git a/pkgs/development/python-modules/torch/default.nix b/pkgs/development/python-modules/torch/default.nix index f33c6744c25e..bdeec017fbf4 100644 --- a/pkgs/development/python-modules/torch/default.nix +++ b/pkgs/development/python-modules/torch/default.nix @@ -167,7 +167,7 @@ in buildPythonPackage rec { ] ++ lib.optionals cudaSupport [ cudatoolkit_joined ]; buildInputs = [ blas blas.provider pybind11 ] - ++ [ linuxHeaders_5_19 ] # TMP: avoid "flexible array member" errors for now + ++ lib.optionals stdenv.isLinux [ linuxHeaders_5_19 ] # TMP: avoid "flexible array member" errors for now ++ lib.optionals cudaSupport [ cudnn magma nccl ] ++ lib.optionals stdenv.isLinux [ numactl ] ++ lib.optionals stdenv.isDarwin [ CoreServices libobjc ];