nixpkgs/pkgs/development/python-modules/daphne/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

61 lines
1.0 KiB
Nix
Raw Normal View History

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