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