2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
flet-client-flutter,
|
|
|
|
poetry-core,
|
|
|
|
flet-core,
|
|
|
|
httpx,
|
|
|
|
oauthlib,
|
2024-01-02 11:29:13 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "flet-runtime";
|
2024-04-21 15:54:59 +00:00
|
|
|
inherit (flet-client-flutter) version src;
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
pyproject = true;
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
sourceRoot = "${src.name}/sdk/python/packages/flet-runtime";
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substitute ${./_setup_runtime.py} src/flet_runtime/_setup_runtime.py \
|
|
|
|
--replace @flet-client-flutter@ ${flet-client-flutter}
|
|
|
|
|
|
|
|
echo -e "import flet_runtime._setup_runtime\n$(cat src/flet_runtime/__init__.py)" > src/flet_runtime/__init__.py
|
|
|
|
'';
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
2024-01-25 14:12:00 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonRelaxDeps = [ "httpx" ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
flet-core
|
|
|
|
httpx
|
|
|
|
oauthlib
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "flet_runtime" ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
changelog = "https://github.com/flet-dev/flet/releases/tag/v${version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Base package for Flet desktop and Flet mobile";
|
2024-01-02 11:29:13 +00:00
|
|
|
homepage = "https://flet.dev/";
|
|
|
|
license = lib.licenses.asl20;
|
2024-04-21 15:54:59 +00:00
|
|
|
maintainers = with lib.maintainers; [ lucasew ];
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
}
|