about summary refs log tree commit diff
path: root/pkgs/development/python-modules/tensorflow
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@sap.com>2021-11-16 19:21:45 +0100
committerSandro Jäckel <sandro.jaeckel@gmail.com>2021-11-17 01:01:02 +0100
commit12371f83b1e2e8b398116d4fa4af9b33f4401ffd (patch)
tree5dfe6d588080354fc51885f310d14412bf36c418 /pkgs/development/python-modules/tensorflow
parentc46f9c42b8f0508bfccd96a75e7ff4ad920d594e (diff)
python39Packages.tensorflow: simplify pname+version code
Diffstat (limited to 'pkgs/development/python-modules/tensorflow')
-rw-r--r--pkgs/development/python-modules/tensorflow/bin.nix5
1 files changed, 1 insertions, 4 deletions
diff --git a/pkgs/development/python-modules/tensorflow/bin.nix b/pkgs/development/python-modules/tensorflow/bin.nix
index 6d4df4eb2c8e3..c14a90e0953ef 100644
--- a/pkgs/development/python-modules/tensorflow/bin.nix
+++ b/pkgs/development/python-modules/tensorflow/bin.nix
@@ -42,13 +42,10 @@ assert ! (stdenv.isDarwin && cudaSupport);
 
 let
   packages = import ./binary-hashes.nix;
-
-  variant = if cudaSupport then "-gpu" else "";
-  pname = "tensorflow${variant}";
   metadataPatch = ./relax-dependencies-metadata.patch;
   patch = ./relax-dependencies.patch;
 in buildPythonPackage {
-  inherit pname;
+  pname = "tensorflow" + lib.optionalString cudaSupport "-gpu";
   inherit (packages) version;
   format = "wheel";