1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pytestCheckHook, 6 pythonOlder, 7 setuptools, 8 wsproto, 9}: 10 11buildPythonPackage rec { 12 pname = "simple-websocket"; 13 version = "1.1.0"; 14 pyproject = true; 15 16 disabled = pythonOlder "3.11"; 17 18 src = fetchFromGitHub { 19 owner = "miguelgrinberg"; 20 repo = "simple-websocket"; 21 tag = "v${version}"; 22 hash = "sha256-dwL6GUyygNGBXqkkTnsHwFFpa1JAaeWc9ycQNRgTN4I="; 23 }; 24 25 build-system = [ setuptools ]; 26 27 dependencies = [ wsproto ]; 28 29 nativeCheckInputs = [ pytestCheckHook ]; 30 31 pythonImportsCheck = [ "simple_websocket" ]; 32 33 disabledTests = [ 34 # Tests require network access 35 "SimpleWebSocketClientTestCase" 36 ]; 37 38 meta = with lib; { 39 description = "Simple WebSocket server and client for Python"; 40 homepage = "https://github.com/miguelgrinberg/simple-websocket"; 41 changelog = "https://github.com/miguelgrinberg/simple-websocket/blob/${version}/CHANGES.md"; 42 license = licenses.mit; 43 maintainers = with maintainers; [ fab ]; 44 }; 45}