1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 fetchFromGitHub,
6 pytest-asyncio,
7 pytestCheckHook,
8 pythonOlder,
9 setuptools,
10 wheel,
11 xmltodict,
12}:
13
14buildPythonPackage rec {
15 pname = "aioruckus";
16 version = "0.34";
17 format = "pyproject";
18
19 disabled = pythonOlder "3.10";
20
21 src = fetchFromGitHub {
22 owner = "ms264556";
23 repo = "aioruckus";
24 rev = "refs/tags/v${version}";
25 hash = "sha256-SPj1w1jAJFBsWj1+N8srAbvlh+yB3ZTT7aDcZTnmUto=";
26 };
27
28 postPatch = ''
29 substituteInPlace pyproject.toml \
30 --replace "setuptools>=68.1" "setuptools"
31 '';
32
33 nativeBuildInputs = [
34 setuptools
35 wheel
36 ];
37
38 propagatedBuildInputs = [
39 aiohttp
40 xmltodict
41 ];
42
43 pythonImportsCheck = [ "aioruckus" ];
44
45 nativeCheckInputs = [
46 pytest-asyncio
47 pytestCheckHook
48 ];
49
50 disabledTests = [
51 # these require a local ruckus device
52 "test_ap_info"
53 "test_authentication_error"
54 "test_connect_success"
55 "test_current_active_clients"
56 "test_mesh_info"
57 "test_system_info"
58 ];
59
60 meta = with lib; {
61 description = "Python client for Ruckus Unleashed and Ruckus ZoneDirector";
62 homepage = "https://github.com/ms264556/aioruckus";
63 license = licenses.bsd0;
64 maintainers = with maintainers; [ fab ];
65 };
66}