1{
2 lib,
3 buildPythonPackage,
4 flet-client-flutter,
5
6 # build-system
7 poetry-core,
8 pytestCheckHook,
9
10 # propagates
11 fastapi,
12 httpx,
13 oauthlib,
14 packaging,
15 qrcode,
16 repath,
17 cookiecutter,
18 uvicorn,
19 watchdog,
20 websocket-client,
21 websockets,
22}:
23
24buildPythonPackage rec {
25 pname = "flet";
26 inherit (flet-client-flutter) version src;
27 pyproject = true;
28
29 sourceRoot = "${src.name}/sdk/python/packages/flet";
30
31 build-system = [ poetry-core ];
32
33 nativeCheckInputs = [ pytestCheckHook ];
34
35 makeWrapperArgs = [
36 "--prefix"
37 "PYTHONPATH"
38 ":"
39 "$PYTHONPATH"
40 ];
41
42 _flet_version = ''
43 version = "${version}"
44 def update_version():
45 pass
46 '';
47 _flet_utils_pip = ''
48 def install_flet_package(name: str):
49 pass
50 '';
51
52 postPatch = ''
53 # nerf out nagging about pip
54 echo "$_flet_version" > src/flet/version.py
55 echo "$_flet_utils_pip" >> src/flet/utils/pip.py
56 '';
57
58 dependencies = [
59 fastapi
60 uvicorn
61 websocket-client
62 watchdog
63 oauthlib
64 websockets
65 httpx
66 packaging
67 repath
68 qrcode
69 cookiecutter
70 fastapi
71 uvicorn
72 ];
73
74 pythonImportsCheck = [ "flet" ];
75
76 meta = {
77 description = "Framework that enables you to easily build realtime web, mobile, and desktop apps in Python";
78 homepage = "https://flet.dev/";
79 changelog = "https://github.com/flet-dev/flet/releases/tag/v${version}";
80 license = lib.licenses.asl20;
81 maintainers = with lib.maintainers; [
82 heyimnova
83 lucasew
84 ];
85 mainProgram = "flet";
86 };
87}