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