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.
62 lines
1.1 KiB
Nix
62 lines
1.1 KiB
Nix
{ lib
|
|
, stdenv
|
|
, asgiref
|
|
, autobahn
|
|
, buildPythonPackage
|
|
, django
|
|
, fetchFromGitHub
|
|
, hypothesis
|
|
, pytest-asyncio
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, twisted
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "daphne";
|
|
version = "4.0.0";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "django";
|
|
repo = pname;
|
|
rev = version;
|
|
hash = "sha256-vPMrmC2B0Pcvk8Y1FsJ4PXnzIMtPod7lL2u0IYNVUxc=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
asgiref
|
|
autobahn
|
|
twisted
|
|
] ++ twisted.optional-dependencies.tls;
|
|
|
|
nativeCheckInputs = [
|
|
django
|
|
hypothesis
|
|
pytest-asyncio
|
|
pytestCheckHook
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.py \
|
|
--replace "pytest-runner" ""
|
|
'';
|
|
|
|
# Most tests fail on darwin
|
|
doCheck = !stdenv.isDarwin;
|
|
|
|
pythonImportsCheck = [
|
|
"daphne"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Django ASGI (HTTP/WebSocket) server";
|
|
mainProgram = "daphne";
|
|
homepage = "https://github.com/django/daphne";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ ];
|
|
};
|
|
}
|