1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 pytestCheckHook, 6 python-socks, 7 pythonOlder, 8 setuptools, 9}: 10 11buildPythonPackage rec { 12 pname = "websocket-client"; 13 version = "1.8.0"; 14 pyproject = true; 15 16 disabled = pythonOlder "3.8"; 17 18 src = fetchPypi { 19 pname = "websocket_client"; 20 inherit version; 21 hash = "sha256-Mjnfn0TaYy+WASRygF1AojKBqZECfOEdL0Wm8krEw9o="; 22 }; 23 24 build-system = [ setuptools ]; 25 26 optional-dependencies = { 27 optional = [ 28 python-socks 29 # wsaccel is not available at the moment 30 ]; 31 }; 32 33 nativeCheckInputs = [ pytestCheckHook ]; 34 35 pythonImportsCheck = [ "websocket" ]; 36 37 meta = with lib; { 38 description = "Websocket client for Python"; 39 homepage = "https://github.com/websocket-client/websocket-client"; 40 changelog = "https://github.com/websocket-client/websocket-client/blob/v${version}/ChangeLog"; 41 license = licenses.lgpl21Plus; 42 maintainers = with maintainers; [ fab ]; 43 mainProgram = "wsdump"; 44 }; 45}