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;
24 format = "wheel";
25 } // (if isPy3k then {
26 python = "py3";
27 sha256 = "1g62i3nrgp8q9wfsyqqjkkfnsz7x2k018c26kdh527h1yrjjrbac";
28 } else {
29 python = "py2";
30 sha256 = "0l3zc8j2sh7h1z4qpy8kfvclv3kzndri55p10i42q6xahs9phav1";
31 }));
32
33 propagatedBuildInputs = [
34 numpy
35 werkzeug
36 protobuf
37 markdown
38 grpcio
39 absl-py
40 # not declared in install_requires, but used at runtime
41 # https://github.com/NixOS/nixpkgs/issues/73840
42 wheel
43 ] ++ lib.optional (!isPy3k) futures;
44
45 # in the absence of a real test suite, run cli and imports
46 checkPhase = ''
47 $out/bin/tensorboard --help > /dev/null
48 '';
49
50 pythonImportsCheck = [
51 "tensorboard"
52 "tensorboard.backend"
53 "tensorboard.compat"
54 "tensorboard.data"
55 "tensorboard.plugins"
56 "tensorboard.summary"
57 "tensorboard.util"
58 ];
59
60 meta = with lib; {
61 description = "TensorFlow's Visualization Toolkit";
62 homepage = "http://tensorflow.org";
63 license = licenses.asl20;
64 maintainers = with maintainers; [ abbradar ];
65 };
66}