2019-08-22 22:31:54 +01:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, pythonOlder, isPy36
|
|
|
|
, dataclasses
|
|
|
|
, h11
|
|
|
|
, pytest
|
|
|
|
}:
|
2018-03-05 16:18:02 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "wsproto";
|
2020-11-29 14:04:46 +00:00
|
|
|
version = "1.0.0";
|
2019-08-22 22:31:54 +01:00
|
|
|
disabled = pythonOlder "3.6"; # python versions <3.6
|
2018-03-05 16:18:02 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-11-29 14:04:46 +00:00
|
|
|
sha256 = "868776f8456997ad0d9720f7322b746bbe9193751b5b290b7f924659377c8c38";
|
2018-03-05 16:18:02 +00:00
|
|
|
};
|
|
|
|
|
2019-08-22 22:31:54 +01:00
|
|
|
propagatedBuildInputs = [ h11 ] ++ lib.optional isPy36 dataclasses;
|
2018-03-05 16:18:02 +00:00
|
|
|
|
2019-02-14 07:37:33 +00:00
|
|
|
checkInputs = [ pytest ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
py.test
|
|
|
|
'';
|
|
|
|
|
2019-04-17 18:56:56 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Pure Python, pure state-machine WebSocket implementation";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/python-hyper/wsproto/";
|
2019-04-17 18:56:56 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
};
|
2018-03-05 16:18:02 +00:00
|
|
|
}
|