1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 fixtures,
6 mock,
7 pbr,
8 pytestCheckHook,
9 pythonOlder,
10 requests,
11 testtools,
12}:
13
14buildPythonPackage rec {
15 pname = "pyopnsense";
16 version = "0.4.0";
17 format = "setuptools";
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchPypi {
22 inherit pname version;
23 hash = "sha256-3DKlVrOtMa55gTu557pgojRpdgrO5pEZ3L+9gKoW9yg=";
24 };
25
26 propagatedBuildInputs = [
27 pbr
28 requests
29 ];
30
31 nativeCheckInputs = [
32 fixtures
33 mock
34 pytestCheckHook
35 testtools
36 ];
37
38 pythonImportsCheck = [ "pyopnsense" ];
39
40 meta = with lib; {
41 description = "Python client for the OPNsense API";
42 homepage = "https://github.com/mtreinish/pyopnsense";
43 changelog = "https://github.com/mtreinish/pyopnsense/releases/tag/${version}";
44 license = with licenses; [ gpl3Plus ];
45 maintainers = with maintainers; [ fab ];
46 };
47}