about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pytorch/bin.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pytorch/bin.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/pytorch/bin.nix11
1 files changed, 8 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pytorch/bin.nix b/nixpkgs/pkgs/development/python-modules/pytorch/bin.nix
index b1b662e95b3e..6a97e6d30a4f 100644
--- a/nixpkgs/pkgs/development/python-modules/pytorch/bin.nix
+++ b/nixpkgs/pkgs/development/python-modules/pytorch/bin.nix
@@ -3,6 +3,7 @@
 , fetchurl
 , isPy37
 , isPy38
+, isPy39
 , python
 , nvidia_x11
 , addOpenGLRunpath
@@ -11,21 +12,24 @@
 , patchelf
 , pyyaml
 , requests
+, typing-extensions
 }:
 
 let
   pyVerNoDot = builtins.replaceStrings [ "." ] [ "" ] python.pythonVersion;
   platform = if stdenv.isDarwin then "darwin" else "linux";
-  srcs = import ./binary-hashes.nix;
+  srcs = import ./binary-hashes.nix version;
   unsupported = throw "Unsupported system";
+  version = "1.7.1";
 in buildPythonPackage {
+  inherit version;
+
   pname = "pytorch";
   # Don't forget to update pytorch to the same version.
-  version = "1.6.0";
 
   format = "wheel";
 
-  disabled = !(isPy37 || isPy38);
+  disabled = !(isPy37 || isPy38 || isPy39);
 
   src = fetchurl srcs."${stdenv.system}-${pyVerNoDot}" or unsupported;
 
@@ -39,6 +43,7 @@ in buildPythonPackage {
     numpy
     pyyaml
     requests
+    typing-extensions
   ];
 
   postInstall = ''