2020-04-24 23:36:52 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, pythonOlder, isPy36
|
|
|
|
, dataclasses
|
|
|
|
, h11
|
|
|
|
, pytest
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "wsproto";
|
2022-04-15 01:41:22 +00:00
|
|
|
version = "1.1.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
disabled = pythonOlder "3.6"; # python versions <3.6
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-04-15 01:41:22 +00:00
|
|
|
sha256 = "sha256-ouVr/Vx82DwTadg7X+zNbTd5i3SHKGbmJhbg7PERvag=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ h11 ] ++ lib.optional isPy36 dataclasses;
|
|
|
|
|
|
|
|
checkInputs = [ pytest ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
py.test
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Pure Python, pure state-machine WebSocket implementation";
|
|
|
|
homepage = "https://github.com/python-hyper/wsproto/";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|