diff --git a/pkgs/development/python-modules/pytorch/default.nix b/pkgs/development/python-modules/pytorch/default.nix index 8b9ba07ce953..7c45659220cb 100644 --- a/pkgs/development/python-modules/pytorch/default.nix +++ b/pkgs/development/python-modules/pytorch/default.nix @@ -77,11 +77,14 @@ in buildPythonPackage rec { # https://github.com/intel/mkl-dnn/commit/8134d346cdb7fe1695a2aa55771071d455fae0bc NIX_CFLAGS_COMPILE = lib.optionals (numpy.blasImplementation == "mkl") [ "-Wno-error=array-bounds" ]; - buildInputs = [ + nativeBuildInputs = [ cmake - numpy.blas utillinux which + ]; + + buildInputs = [ + numpy.blas ] ++ lib.optionals cudaSupport [ cudatoolkit_joined cudnn ] ++ lib.optionals stdenv.isLinux [ numactl ];