File tree Expand file tree Collapse file tree 5 files changed +114
-56
lines changed
development/python-modules Expand file tree Collapse file tree 5 files changed +114
-56
lines changed Original file line number Diff line number Diff line change 11{
2- lib ,
3- fetchFromGitHub ,
4- rustPlatform ,
52 python3Packages ,
6- libiconv ,
73} :
8-
9- python3Packages . buildPythonApplication rec {
10- pname = "granian" ;
11- version = "1.7.0" ;
12- pyproject = true ;
13-
14- src = fetchFromGitHub {
15- owner = "emmett-framework" ;
16- repo = "granian" ;
17- rev = "v${ version } " ;
18- hash = "sha256-OjyDwfp0d779oFQ7wUdR1eRPP35kcJa3wIdcYGrGGME=" ;
19- } ;
20-
21- cargoDeps = rustPlatform . fetchCargoVendor {
22- inherit src ;
23- name = "${ pname } -${ version } " ;
24- hash = "sha256-jAjHvVyFhGGE/OwfusUE/GdrNrEgvh48lmC5tla4lhI=" ;
25- } ;
26-
27- nativeBuildInputs = with rustPlatform ; [
28- cargoSetupHook
29- maturinBuildHook
30- ] ;
31-
32- buildInputs = [
33- libiconv
34- ] ;
35-
36- dependencies = [
37- python3Packages . uvloop
38- python3Packages . click
39- ] ;
40-
41- meta = {
42- description = "Rust HTTP server for Python ASGI/WSGI/RSGI applications" ;
43- homepage = "https://github.com/emmett-framework/granian" ;
44- license = lib . licenses . bsd3 ;
45- mainProgram = "granian" ;
46- maintainers = with lib . maintainers ; [ lucastso10 ] ;
47- platforms = lib . platforms . unix ;
48- } ;
49- }
4+ python3Packages . toPythonApplication python3Packages . granian
Original file line number Diff line number Diff line change 1+ {
2+ lib ,
3+ fetchFromGitHub ,
4+ rustPlatform ,
5+ cacert ,
6+ buildPythonPackage ,
7+ uvloop ,
8+ click ,
9+ setproctitle ,
10+ watchfiles ,
11+ versionCheckHook ,
12+ pytestCheckHook ,
13+ pytest-asyncio ,
14+ websockets ,
15+ httpx ,
16+ sniffio ,
17+ nix-update-script ,
18+ } :
19+
20+ buildPythonPackage rec {
21+ pname = "granian" ;
22+ version = "2.2.0" ;
23+ pyproject = true ;
24+
25+ src = fetchFromGitHub {
26+ owner = "emmett-framework" ;
27+ repo = "granian" ;
28+ tag = "v${ version } " ;
29+ hash = "sha256-YQ9+PcKXtSc+wdvhgDfSAfcv/y53oqcrPCEI9dDKFa0=" ;
30+ } ;
31+
32+ cargoDeps = rustPlatform . fetchCargoVendor {
33+ inherit pname version src ;
34+ hash = "sha256-XJ61+u5aGQis6YkfASD+WJHEKDBL+2ImqCAuQmm3A/g=" ;
35+ } ;
36+
37+ nativeBuildInputs = with rustPlatform ; [
38+ cargoSetupHook
39+ maturinBuildHook
40+ ] ;
41+
42+ dependencies = [
43+ click
44+ ] ;
45+
46+ optional-dependencies = {
47+ pname = [ setproctitle ] ;
48+ reload = [ watchfiles ] ;
49+ # rloop = [ rloop ]; # not packaged
50+ uvloop = [ uvloop ] ;
51+ } ;
52+
53+ nativeCheckInputs = [
54+ versionCheckHook
55+ pytestCheckHook
56+ pytest-asyncio
57+ websockets
58+ httpx
59+ sniffio
60+ ] ;
61+
62+ preCheck = ''
63+ # collides with the one installed in $out
64+ rm -rf granian/
65+ '' ;
66+
67+ # needed for checks
68+ env . SSL_CERT_FILE = "${ cacert } /etc/ssl/certs/ca-bundle.crt" ;
69+
70+ __darwinAllowLocalNetworking = true ;
71+
72+ pytestFlagsArray = [ "tests/" ] ;
73+
74+ pythonImportCheck = [ "granian" ] ;
75+
76+ versionCheckProgramArg = "--version" ;
77+
78+ passthru . updateScript = nix-update-script { } ;
79+
80+ meta = {
81+ description = "Rust HTTP server for Python ASGI/WSGI/RSGI applications" ;
82+ homepage = "https://github.com/emmett-framework/granian" ;
83+ license = lib . licenses . bsd3 ;
84+ mainProgram = "granian" ;
85+ maintainers = with lib . maintainers ; [
86+ lucastso10
87+ pbsds
88+ ] ;
89+ platforms = lib . platforms . unix ;
90+ } ;
91+ }
Original file line number Diff line number Diff line change 44 fetchFromGitHub ,
55 poetry-core ,
66 pythonOlder ,
7+ reflex ,
8+ pytestCheckHook ,
79} :
810
911buildPythonPackage rec {
@@ -20,22 +22,25 @@ buildPythonPackage rec {
2022 hash = "sha256-foIXPLWcxNf33y39BgiRpvwRnZOTcfAjhCvC4TD8ZMs=" ;
2123 } ;
2224
23- pythonRemoveDeps = [
24- # Circular dependency
25- "reflex"
25+ build-system = [ poetry-core ] ;
26+
27+ dependencies = [
28+ reflex
2629 ] ;
2730
28- build-system = [ poetry-core ] ;
31+ pythonImportsCheck = [ "reflex_chakra" ] ;
2932
30- # pythonImportsCheck = [ "reflex_chakra" ];
33+ nativeCheckInputs = [ pytestCheckHook ] ;
3134
35+ # there are no "test_*.py" files, and the
36+ # other files with `test_*` functions are not maintained it seems
3237 doCheck = false ;
3338
34- meta = with lib ; {
39+ meta = {
3540 description = "Chakra Implementation in Reflex" ;
3641 homepage = "https://github.com/reflex-dev/reflex-chakra" ;
3742 changelog = "https://github.com/reflex-dev/reflex-chakra/releases/tag/${ src . tag } " ;
38- license = licenses . asl20 ;
39- maintainers = with maintainers ; [ fab ] ;
43+ license = lib . licenses . asl20 ;
44+ maintainers = with lib . maintainers ; [ fab ] ;
4045 } ;
4146}
Original file line number Diff line number Diff line change 99 dill ,
1010 distro ,
1111 fastapi ,
12+ granian ,
1213 gunicorn ,
1314 hatchling ,
1415 httpx ,
2526 pydantic ,
2627 pytest-asyncio ,
2728 pytest-mock ,
29+ python-dotenv ,
2830 pytestCheckHook ,
2931 python-engineio ,
3032 python-multipart ,
4850
4951buildPythonPackage rec {
5052 pname = "reflex" ;
51- version = "0.7.4a0 " ;
53+ version = "0.7.5 " ;
5254 pyproject = true ;
5355
5456 src = fetchFromGitHub {
5557 owner = "reflex-dev" ;
5658 repo = "reflex" ;
5759 tag = "v${ version } " ;
58- hash = "sha256-KFNcdPoZc+Zps8OV3aLIkk9rlbfy6rx0I9JrYFt2b5E =" ;
60+ hash = "sha256-uHlLItjONHGnuE4t2UOcVRYxcDDbRldUwHd8mPn7JfY =" ;
5961 } ;
6062
6163 pythonRelaxDeps = [
@@ -77,6 +79,8 @@ buildPythonPackage rec {
7779 dill
7880 distro
7981 fastapi
82+ granian
83+ granian . optional-dependencies . reload
8084 gunicorn
8185 httpx
8286 jinja2
@@ -106,6 +110,7 @@ buildPythonPackage rec {
106110 pytestCheckHook
107111 pytest-asyncio
108112 pytest-mock
113+ python-dotenv
109114 playwright
110115 attrs
111116 numpy
Original file line number Diff line number Diff line change @@ -5873,6 +5873,8 @@ self: super: with self; {
58735873
58745874 grandalf = callPackage ../development/python-modules/grandalf { };
58755875
5876+ granian = callPackage ../development/python-modules/granian { };
5877+
58765878 graph-tool = callPackage ../development/python-modules/graph-tool { inherit (pkgs) cgal; };
58775879
58785880 grapheme = callPackage ../development/python-modules/grapheme { };
You can’t perform that action at this time.
0 commit comments