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