Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 21 additions & 23 deletions pkgs/development/python-modules/reflex/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
lib,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
alembic,
attrs,
build,
Expand All @@ -11,52 +10,52 @@
distro,
fastapi,
gunicorn,
hatchling,
httpx,
jinja2,
lazy-loader,
numpy,
packaging,
pandas,
pillow,
platformdirs,
playwright,
plotly,
psutil,
pydantic,
pytest-asyncio,
pytest-mock,
playwright,
pytestCheckHook,
python-engineio,
python-multipart,
python-socketio,
pythonOlder,
redis,
reflex-chakra,
reflex-hosting-cli,
rich,
sqlmodel,
starlette-admin,
tomlkit,
twine,
typer,
typing-extensions,
unzip,
uvicorn,
watchdog,
watchfiles,
versionCheckHook,
wheel,
wrapt,
writableTmpDirAsHomeHook,
}:

buildPythonPackage rec {
pname = "reflex";
version = "0.7.2";
version = "0.7.4a0";
pyproject = true;

disabled = pythonOlder "3.10";

src = fetchFromGitHub {
owner = "reflex-dev";
repo = "reflex";
tag = "v${version}";
hash = "sha256-XhYgZx4zc2utWIzT6lvGNyGn6MyTxhsiaFa3/h4XQjM=";
hash = "sha256-KFNcdPoZc+Zps8OV3aLIkk9rlbfy6rx0I9JrYFt2b5E=";
};

pythonRelaxDeps = [
Expand All @@ -69,7 +68,7 @@ buildPythonPackage rec {
"build"
];

build-system = [ poetry-core ];
build-system = [ hatchling ];

dependencies = [
alembic
Expand All @@ -82,24 +81,24 @@ buildPythonPackage rec {
httpx
jinja2
lazy-loader
packaging
platformdirs
psutil
pydantic
python-engineio
python-multipart
python-socketio
redis
reflex-chakra
reflex-hosting-cli
rich
sqlmodel
starlette-admin
tomlkit
twine # used in custom_components/custom_components.py
typer
typing-extensions
uvicorn
watchdog
watchfiles
wheel
wrapt
];

Expand All @@ -114,11 +113,10 @@ buildPythonPackage rec {
pandas
pillow
unzip
writableTmpDirAsHomeHook
versionCheckHook
];

preCheck = ''
export HOME="$(mktemp -d)"
'';
versionCheckProgramArg = "--version";

disabledTests = [
# Tests touch network
Expand All @@ -128,13 +126,13 @@ buildPythonPackage rec {
"test_node_version"
# /proc is too funky in nix sandbox
"test_get_cpu_info"
# broken
"test_potentially_dirty_substates" # AssertionError: Extra items in the left set
# flaky
"test_preprocess" # KeyError: 'reflex___state____state'
"test_send" # AssertionError: Expected 'post' to have been called once. Called 0 times.
# tries to pin the string of a traceback, doesn't account for ansi colors
"test_state_with_invalid_yield"
# tries to run bun or npm
"test_output_system_info"
];

disabledTestPaths = [
Expand All @@ -144,12 +142,12 @@ buildPythonPackage rec {

pythonImportsCheck = [ "reflex" ];

meta = with lib; {
meta = {
description = "Web apps in pure Python";
homepage = "https://github.com/reflex-dev/reflex";
changelog = "https://github.com/reflex-dev/reflex/releases/tag/${src.tag}";
license = licenses.asl20;
maintainers = with maintainers; [ pbsds ];
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ pbsds ];
mainProgram = "reflex";
};
}