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