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