depot/third_party/nixpkgs/pkgs/by-name/gr/granian/package.nix
Default email 7e47f3658e Project import generated by Copybara.
GitOrigin-RevId: 1925c603f17fc89f4c8f6bf6f631a802ad85d784
2024-09-26 11:04:55 +00:00

50 lines
1 KiB
Nix

{
lib,
fetchFromGitHub,
rustPlatform,
python3Packages,
libiconv,
}:
python3Packages.buildPythonApplication rec {
pname = "granian";
version = "1.6.0";
pyproject = true;
src = fetchFromGitHub {
owner = "emmett-framework";
repo = "granian";
rev = "v${version}";
hash = "sha256-ZIwZrLl7goweYUj3t5e0yaOqeppFHXvK9PL3chNZZRw=";
};
cargoDeps = rustPlatform.importCargoLock {
lockFile = ./Cargo.lock;
outputHashes = {
"pyo3-log-0.11.0" = "sha256-UU8064vM7cf20lwfifyPC205CY4tIgif0slDz/Pjf9Q=";
};
};
nativeBuildInputs = with rustPlatform; [
cargoSetupHook
maturinBuildHook
];
buildInputs = [
libiconv
];
dependencies = [
python3Packages.uvloop
python3Packages.click
];
meta = {
description = "Rust HTTP server for Python ASGI/WSGI/RSGI applications";
homepage = "https://github.com/emmett-framework/granian";
license = lib.licenses.bsd3;
mainProgram = "granian";
maintainers = with lib.maintainers; [ lucastso10 ];
platforms = lib.platforms.unix;
};
}