1{ 2 lib, 3 fetchPypi, 4 buildPythonPackage, 5 pythonOlder, 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.16.2"; 28 format = "wheel"; 29 disabled = pythonOlder "3.9"; 30 31 src = fetchPypi { 32 inherit pname version format; 33 dist = "py3"; 34 python = "py3"; 35 hash = "sha256-nytOfa2GZnYVwOXNBy8eqEA/wDKimfAHLW90hVd1zEU="; 36 }; 37 38 nativeBuildInputs = [ pythonRelaxDepsHook ]; 39 40 pythonRelaxDeps = [ 41 "google-auth-oauthlib" 42 "protobuf" 43 ]; 44 45 propagatedBuildInputs = [ 46 absl-py 47 grpcio 48 google-auth-oauthlib 49 markdown 50 numpy 51 protobuf 52 setuptools 53 tensorboard-data-server 54 tensorboard-plugin-profile 55 tensorboard-plugin-wit 56 werkzeug 57 # not declared in install_requires, but used at runtime 58 # https://github.com/NixOS/nixpkgs/issues/73840 59 wheel 60 ]; 61 62 # in the absence of a real test suite, run cli and imports 63 checkPhase = '' 64 $out/bin/tensorboard --help > /dev/null 65 ''; 66 67 pythonImportsCheck = [ 68 "tensorboard" 69 "tensorboard.backend" 70 "tensorboard.compat" 71 "tensorboard.data" 72 "tensorboard.plugins" 73 "tensorboard.summary" 74 "tensorboard.util" 75 ]; 76 77 meta = with lib; { 78 changelog = "https://github.com/tensorflow/tensorboard/blob/${version}/RELEASE.md"; 79 description = "TensorFlow's Visualization Toolkit"; 80 homepage = "https://www.tensorflow.org/"; 81 license = licenses.asl20; 82 mainProgram = "tensorboard"; 83 maintainers = with maintainers; [ abbradar ]; 84 }; 85}