nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 47 lines 1.2 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 wsproto, 7 pythonAtLeast, 8 pytestCheckHook, 9}: 10 11buildPythonPackage (finalAttrs: { 12 pname = "simple-websocket"; 13 version = "1.1.0"; 14 pyproject = true; 15 16 src = fetchFromGitHub { 17 owner = "miguelgrinberg"; 18 repo = "simple-websocket"; 19 tag = "v${finalAttrs.version}"; 20 hash = "sha256-dwL6GUyygNGBXqkkTnsHwFFpa1JAaeWc9ycQNRgTN4I="; 21 }; 22 23 build-system = [ setuptools ]; 24 25 dependencies = [ wsproto ]; 26 27 nativeCheckInputs = [ pytestCheckHook ]; 28 29 pythonImportsCheck = [ "simple_websocket" ]; 30 31 disabledTests = [ 32 # Tests require network access 33 "SimpleWebSocketClientTestCase" 34 ] 35 ++ lib.optionals (pythonAtLeast "3.14") [ 36 # RuntimeError: There is no current event loop in thread 'MainThread' 37 "AioSimpleWebSocketServerTestCase" 38 ]; 39 40 meta = { 41 description = "Simple WebSocket server and client for Python"; 42 homepage = "https://github.com/miguelgrinberg/simple-websocket"; 43 changelog = "https://github.com/miguelgrinberg/simple-websocket/blob/${finalAttrs.src.tag}/CHANGES.md"; 44 license = lib.licenses.mit; 45 maintainers = with lib.maintainers; [ fab ]; 46 }; 47})