1{ lib, buildPythonPackage, fetchPypi, pythonOlder, isPy36
2, dataclasses
3, h11
4, pytest
5}:
6
7buildPythonPackage rec {
8 pname = "wsproto";
9 version = "1.0.0";
10 disabled = pythonOlder "3.6"; # python versions <3.6
11
12 src = fetchPypi {
13 inherit pname version;
14 sha256 = "868776f8456997ad0d9720f7322b746bbe9193751b5b290b7f924659377c8c38";
15 };
16
17 propagatedBuildInputs = [ h11 ] ++ lib.optional isPy36 dataclasses;
18
19 checkInputs = [ pytest ];
20
21 checkPhase = ''
22 py.test
23 '';
24
25 meta = with lib; {
26 description = "Pure Python, pure state-machine WebSocket implementation";
27 homepage = "https://github.com/python-hyper/wsproto/";
28 license = licenses.mit;
29 };
30}