base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / gr / granian / package.nix
blob2462ba964cf6d577f7893459b6b1b4d9b253baf2
2   lib,
3   fetchFromGitHub,
4   rustPlatform,
5   python3Packages,
6   libiconv,
7 }:
9 python3Packages.buildPythonApplication rec {
10   pname = "granian";
11   version = "1.6.1";
12   pyproject = true;
14   src = fetchFromGitHub {
15     owner = "emmett-framework";
16     repo = "granian";
17     rev = "v${version}";
18     hash = "sha256-Cuojg2Ko+KH/279z7HGYEthrMAqLgmnoHGjZ8HL7unw=";
19   };
21   cargoDeps = rustPlatform.fetchCargoTarball {
22     inherit src;
23     name = "${pname}-${version}";
24     hash = "sha256-dRBjN0/EmQlGtQ1iGvSPE30KOHVlkWpjpMU2lpIGUdA=";
25   };
27   nativeBuildInputs = with rustPlatform; [
28     cargoSetupHook
29     maturinBuildHook
30   ];
32   buildInputs = [
33     libiconv
34   ];
36   dependencies = [
37     python3Packages.uvloop
38     python3Packages.click
39   ];
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   };