summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/flet-web/default.nix
blob: a0248b9696905f4ebba8b80e675771f8ea9b7298 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{
  lib,
  buildPythonPackage,
  flet-client-flutter,

  # build-system
  poetry-core,

  flet,
  fastapi,
  uvicorn,
  python,
}:

buildPythonPackage rec {
  pname = "flet-web";
  inherit (flet-client-flutter) version src;
  pyproject = true;

  sourceRoot = "${src.name}/sdk/python/packages/flet-web";

  build-system = [ poetry-core ];

  dependencies = [
    flet
    fastapi
    uvicorn
  ];

  pythonImportsCheck = [ "flet_web" ];

  web = flet-client-flutter.override {
    fletTarget = "web";
  };

  postInstall = ''
    ln -s $web $out/${python.sitePackages}/flet_web/web
  '';

  meta = {
    description = "Flet web client in Flutter";
    homepage = "https://flet.dev/";
    changelog = "https://github.com/flet-dev/flet/releases/tag/v${version}";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [
      heyimnova
      lucasew
    ];
  };
}