ff1a94e523
The nixpkgs-unstable channel's programs.sqlite was used to identify packages producing exactly one binary, and these automatically added to their package definitions wherever possible.
57 lines
1.1 KiB
Nix
57 lines
1.1 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pythonOlder
|
|
, typing-extensions
|
|
, wsproto
|
|
, toml
|
|
, h2
|
|
, priority
|
|
, mock
|
|
, poetry-core
|
|
, pytest-asyncio
|
|
, pytest-trio
|
|
, pytestCheckHook
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "hypercorn";
|
|
version = "0.14.3";
|
|
disabled = pythonOlder "3.7";
|
|
format = "pyproject";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "pgjones";
|
|
repo = "Hypercorn";
|
|
rev = version;
|
|
hash = "sha256-ECREs8UwqTWUweUrwnUwpVotCII2v4Bz7ZCk3DSAd8I=";
|
|
};
|
|
|
|
postPatch = ''
|
|
sed -i "/^addopts/d" pyproject.toml
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
poetry-core
|
|
];
|
|
|
|
propagatedBuildInputs = [ wsproto toml h2 priority ]
|
|
++ lib.optionals (pythonOlder "3.8") [ typing-extensions ];
|
|
|
|
nativeCheckInputs = [
|
|
pytest-asyncio
|
|
pytest-trio
|
|
pytestCheckHook
|
|
] ++ lib.optionals (pythonOlder "3.8") [ mock ];
|
|
|
|
pythonImportsCheck = [ "hypercorn" ];
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/pgjones/hypercorn";
|
|
description = "The ASGI web server inspired by Gunicorn";
|
|
mainProgram = "hypercorn";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ dgliwka ];
|
|
};
|
|
}
|