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