about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/tensorflow-tensorboard/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/tensorflow-tensorboard/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/tensorflow-tensorboard/default.nix42
1 files changed, 32 insertions, 10 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/tensorflow-tensorboard/default.nix b/nixpkgs/pkgs/development/python-modules/tensorflow-tensorboard/default.nix
index 031254205066..123c339fea48 100644
--- a/nixpkgs/pkgs/development/python-modules/tensorflow-tensorboard/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/tensorflow-tensorboard/default.nix
@@ -1,4 +1,7 @@
-{ lib, fetchPypi, buildPythonPackage, isPy3k
+{ lib
+, fetchPypi
+, buildPythonPackage
+, pythonOlder
 , numpy
 , wheel
 , werkzeug
@@ -7,6 +10,8 @@
 , markdown
 , absl-py
 , google-auth-oauthlib
+, setuptools
+, tensorboard-data-server
 , tensorboard-plugin-wit
 , tensorboard-plugin-profile
 }:
@@ -17,27 +22,44 @@
 
 buildPythonPackage rec {
   pname = "tensorflow-tensorboard";
-  version = "2.4.0";
+  version = "2.6.0";
   format = "wheel";
-  disabled = !isPy3k;
+  disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     pname = "tensorboard";
     inherit version format;
+    dist = "py3";
     python = "py3";
-    sha256 = "0f17h6i398n8maam0r3rssqvdqnqbwjyf96nnhf482anm1iwdq6d";
+    sha256 = "sha256-99rEzftS0UyeP3RYXOKq+OYgNiCoZOUfr4SYiwn3u9s=";
   };
 
+  postPatch = ''
+    chmod u+rwx -R ./dist
+    pushd dist
+    wheel unpack --dest unpacked ./*.whl
+    pushd unpacked/tensorboard-${version}
+
+    substituteInPlace tensorboard-${version}.dist-info/METADATA \
+      --replace "google-auth (<2,>=1.6.3)" "google-auth (<3,>=1.6.3)"
+
+    popd
+    wheel pack ./unpacked/tensorboard-${version}
+    popd
+  '';
+
   propagatedBuildInputs = [
-    numpy
-    werkzeug
-    protobuf
-    markdown
-    grpcio
     absl-py
+    grpcio
     google-auth-oauthlib
+    markdown
+    numpy
+    protobuf
+    setuptools
+    tensorboard-data-server
     tensorboard-plugin-profile
     tensorboard-plugin-wit
+    werkzeug
     # not declared in install_requires, but used at runtime
     # https://github.com/NixOS/nixpkgs/issues/73840
     wheel
@@ -60,7 +82,7 @@ buildPythonPackage rec {
 
   meta = with lib; {
     description = "TensorFlow's Visualization Toolkit";
-    homepage = "http://tensorflow.org";
+    homepage = "https://www.tensorflow.org/";
     license = licenses.asl20;
     maintainers = with maintainers; [ abbradar ];
   };