1{ lib, fetchPypi, buildPythonPackage, isPy3k
2, numpy
3, wheel
4, werkzeug
5, protobuf
6, grpcio
7, markdown
8, futures
9, absl-py
10}:
11
12# tensorflow/tensorboard is built from a downloaded wheel, because
13# https://github.com/tensorflow/tensorboard/issues/719 blocks
14# buildBazelPackage.
15
16buildPythonPackage rec {
17 pname = "tensorflow-tensorboard";
18 version = "1.15.0";
19 format = "wheel";
20
21 src = fetchPypi ({
22 pname = "tensorboard";
23 inherit version format;
24 } // (if isPy3k then {
25 python = "py3";
26 sha256 = "1g62i3nrgp8q9wfsyqqjkkfnsz7x2k018c26kdh527h1yrjjrbac";
27 } else {
28 python = "py2";
29 sha256 = "0l3zc8j2sh7h1z4qpy8kfvclv3kzndri55p10i42q6xahs9phav1";
30 }));
31
32 propagatedBuildInputs = [
33 numpy
34 werkzeug
35 protobuf
36 markdown
37 grpcio
38 absl-py
39 # not declared in install_requires, but used at runtime
40 # https://github.com/NixOS/nixpkgs/issues/73840
41 wheel
42 ] ++ lib.optional (!isPy3k) futures;
43
44 # in the absence of a real test suite, run cli and imports
45 checkPhase = ''
46 $out/bin/tensorboard --help > /dev/null
47 '';
48
49 pythonImportsCheck = [
50 "tensorboard"
51 "tensorboard.backend"
52 "tensorboard.compat"
53 "tensorboard.data"
54 "tensorboard.plugins"
55 "tensorboard.summary"
56 "tensorboard.util"
57 ];
58
59 meta = with lib; {
60 description = "TensorFlow's Visualization Toolkit";
61 homepage = "http://tensorflow.org";
62 license = licenses.asl20;
63 maintainers = with maintainers; [ abbradar ];
64 };
65}