1{ lib
2, fetchPypi
3, buildPythonPackage
4, pythonOlder
5, pythonAtLeast
6, pythonRelaxDepsHook
7, numpy
8, wheel
9, werkzeug
10, protobuf
11, grpcio
12, markdown
13, absl-py
14, google-auth-oauthlib
15, setuptools
16, tensorboard-data-server
17, tensorboard-plugin-wit
18, tensorboard-plugin-profile
19}:
20
21# tensorflow/tensorboard is built from a downloaded wheel, because
22# https://github.com/tensorflow/tensorboard/issues/719 blocks
23# buildBazelPackage.
24
25buildPythonPackage rec {
26 pname = "tensorboard";
27 version = "2.11.0";
28 format = "wheel";
29 disabled = pythonOlder "3.6" || pythonAtLeast "3.11";
30
31 src = fetchPypi {
32 inherit pname version format;
33 dist = "py3";
34 python = "py3";
35 hash = "sha256-oOWS7oeWLhevPw3Of6rj+70jkDAVnp5iXM6BC341xT0=";
36 };
37
38 nativeBuildInputs = [
39 pythonRelaxDepsHook
40 ];
41
42 pythonRelaxDeps = [
43 "google-auth-oauthlib"
44 "protobuf"
45 ];
46
47 propagatedBuildInputs = [
48 absl-py
49 grpcio
50 google-auth-oauthlib
51 markdown
52 numpy
53 protobuf
54 setuptools
55 tensorboard-data-server
56 tensorboard-plugin-profile
57 tensorboard-plugin-wit
58 werkzeug
59 # not declared in install_requires, but used at runtime
60 # https://github.com/NixOS/nixpkgs/issues/73840
61 wheel
62 ];
63
64 # in the absence of a real test suite, run cli and imports
65 checkPhase = ''
66 $out/bin/tensorboard --help > /dev/null
67 '';
68
69 pythonImportsCheck = [
70 "tensorboard"
71 "tensorboard.backend"
72 "tensorboard.compat"
73 "tensorboard.data"
74 "tensorboard.plugins"
75 "tensorboard.summary"
76 "tensorboard.util"
77 ];
78
79 meta = with lib; {
80 description = "TensorFlow's Visualization Toolkit";
81 homepage = "https://www.tensorflow.org/";
82 license = licenses.asl20;
83 maintainers = with maintainers; [ abbradar ];
84 };
85}