python3Packages.flet-web: use web bundle from flet-client-flutter

Signed-off-by: lucasew <lucas59356@gmail.com>
This commit is contained in:
lucasew
2024-12-27 17:24:26 -03:00
parent 036dc86908
commit abbad06cb3
2 changed files with 12 additions and 0 deletions
@@ -14,6 +14,7 @@
, libplacebo
, _experimental-update-script-combinators
, flet-client-flutter
, fletTarget ? "linux"
}:
flutter.buildFlutterApplication rec {
@@ -33,6 +34,8 @@ flutter.buildFlutterApplication rec {
"-DMIMALLOC_LIB=${mimalloc}/lib/mimalloc.o"
];
targetFlutterPlatform = fletTarget;
pubspecLock = lib.importJSON ./pubspec.lock.json;
nativeBuildInputs = [
@@ -9,6 +9,7 @@
flet,
fastapi,
uvicorn,
python,
}:
buildPythonPackage rec {
@@ -24,6 +25,14 @@ buildPythonPackage rec {
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/";