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