1{
2 lib,
3 stdenv,
4 altair,
5 blinker,
6 buildPythonPackage,
7 cachetools,
8 click,
9 fetchPypi,
10 gitpython,
11 importlib-metadata,
12 numpy,
13 packaging,
14 pandas,
15 pillow,
16 protobuf,
17 pyarrow,
18 pydeck,
19 pympler,
20 python-dateutil,
21 pythonOlder,
22 setuptools,
23 requests,
24 rich,
25 tenacity,
26 toml,
27 tornado,
28 typing-extensions,
29 tzlocal,
30 validators,
31 watchdog,
32}:
33
34buildPythonPackage rec {
35 pname = "streamlit";
36 version = "1.37.0";
37 pyproject = true;
38
39 disabled = pythonOlder "3.8";
40
41 src = fetchPypi {
42 inherit pname version;
43 hash = "sha256-Rj73KLoh504FEi43BOivZEp727WCLigbja9KCkh2GHk=";
44 };
45
46 nativeBuildInputs = [
47 setuptools
48 ];
49
50 pythonRelaxDeps = [ "packaging" ];
51
52 propagatedBuildInputs = [
53 altair
54 blinker
55 cachetools
56 click
57 gitpython
58 importlib-metadata
59 numpy
60 packaging
61 pandas
62 pillow
63 protobuf
64 pyarrow
65 pydeck
66 pympler
67 python-dateutil
68 requests
69 rich
70 tenacity
71 toml
72 tornado
73 typing-extensions
74 tzlocal
75 validators
76 ] ++ lib.optionals (!stdenv.isDarwin) [ watchdog ];
77
78 # pypi package does not include the tests, but cannot be built with fetchFromGitHub
79 doCheck = false;
80
81 pythonImportsCheck = [ "streamlit" ];
82
83 postInstall = ''
84 rm $out/bin/streamlit.cmd # remove windows helper
85 '';
86
87 meta = with lib; {
88 homepage = "https://streamlit.io/";
89 changelog = "https://github.com/streamlit/streamlit/releases/tag/${version}";
90 description = "Fastest way to build custom ML tools";
91 mainProgram = "streamlit";
92 maintainers = with maintainers; [
93 natsukium
94 yrashk
95 ];
96 license = licenses.asl20;
97 };
98}