depot/third_party/nixpkgs/pkgs/development/python-modules/wsproto/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

30 lines
667 B
Nix

{ lib, buildPythonPackage, fetchPypi, pythonOlder, isPy36
, dataclasses
, h11
, pytest
}:
buildPythonPackage rec {
pname = "wsproto";
version = "0.15.0";
disabled = pythonOlder "3.6"; # python versions <3.6
src = fetchPypi {
inherit pname version;
sha256 = "17gsxlli4w8am1wwwl3k90hpdfa213ax40ycbbvb7hjx1v1rhiv1";
};
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;
};
}