Skip to content

Commit d6a369f

Browse files
committed
granian: move to python3Packages
1 parent e82086e commit d6a369f

File tree

3 files changed

+57
-49
lines changed

3 files changed

+57
-49
lines changed
Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,4 @@
11
{
2-
lib,
3-
fetchFromGitHub,
4-
rustPlatform,
52
python3Packages,
6-
libiconv,
7-
nix-update-script,
83
}:
9-
10-
python3Packages.buildPythonApplication rec {
11-
pname = "granian";
12-
version = "2.2.0";
13-
pyproject = true;
14-
15-
src = fetchFromGitHub {
16-
owner = "emmett-framework";
17-
repo = "granian";
18-
rev = "v${version}";
19-
hash = "sha256-YQ9+PcKXtSc+wdvhgDfSAfcv/y53oqcrPCEI9dDKFa0=";
20-
};
21-
22-
cargoDeps = rustPlatform.fetchCargoVendor {
23-
inherit src;
24-
name = "${pname}-${version}";
25-
hash = "sha256-XJ61+u5aGQis6YkfASD+WJHEKDBL+2ImqCAuQmm3A/g=";
26-
};
27-
28-
nativeBuildInputs = with rustPlatform; [
29-
cargoSetupHook
30-
maturinBuildHook
31-
];
32-
33-
buildInputs = [
34-
libiconv
35-
];
36-
37-
dependencies = [
38-
python3Packages.uvloop
39-
python3Packages.click
40-
];
41-
42-
passthru.updateScript = nix-update-script { };
43-
44-
meta = {
45-
description = "Rust HTTP server for Python ASGI/WSGI/RSGI applications";
46-
homepage = "https://github.com/emmett-framework/granian";
47-
license = lib.licenses.bsd3;
48-
mainProgram = "granian";
49-
maintainers = with lib.maintainers; [ lucastso10 ];
50-
platforms = lib.platforms.unix;
51-
};
52-
}
4+
python3Packages.toPythonApplication python3Packages.granian
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
lib,
3+
fetchFromGitHub,
4+
rustPlatform,
5+
buildPythonPackage,
6+
uvloop,
7+
click,
8+
libiconv,
9+
nix-update-script,
10+
}:
11+
12+
buildPythonPackage rec {
13+
pname = "granian";
14+
version = "2.2.0";
15+
pyproject = true;
16+
17+
src = fetchFromGitHub {
18+
owner = "emmett-framework";
19+
repo = "granian";
20+
rev = "v${version}";
21+
hash = "sha256-YQ9+PcKXtSc+wdvhgDfSAfcv/y53oqcrPCEI9dDKFa0=";
22+
};
23+
24+
cargoDeps = rustPlatform.fetchCargoVendor {
25+
inherit src;
26+
name = "${pname}-${version}";
27+
hash = "sha256-XJ61+u5aGQis6YkfASD+WJHEKDBL+2ImqCAuQmm3A/g=";
28+
};
29+
30+
nativeBuildInputs = with rustPlatform; [
31+
cargoSetupHook
32+
maturinBuildHook
33+
];
34+
35+
buildInputs = [
36+
libiconv
37+
];
38+
39+
dependencies = [
40+
uvloop
41+
click
42+
];
43+
44+
passthru.updateScript = nix-update-script { };
45+
46+
meta = {
47+
description = "Rust HTTP server for Python ASGI/WSGI/RSGI applications";
48+
homepage = "https://github.com/emmett-framework/granian";
49+
license = lib.licenses.bsd3;
50+
mainProgram = "granian";
51+
maintainers = with lib.maintainers; [ lucastso10 ];
52+
platforms = lib.platforms.unix;
53+
};
54+
}

pkgs/top-level/python-packages.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5860,6 +5860,8 @@ self: super: with self; {
58605860

58615861
grandalf = callPackage ../development/python-modules/grandalf { };
58625862

5863+
granian = callPackage ../development/python-modules/granian { };
5864+
58635865
graph-tool = callPackage ../development/python-modules/graph-tool { inherit (pkgs) cgal; };
58645866

58655867
grapheme = callPackage ../development/python-modules/grapheme { };

0 commit comments

Comments
 (0)