1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 pytestCheckHook,
7 requests,
8 segno,
9 setuptools,
10}:
11
12buildPythonPackage rec {
13 pname = "fritzconnection";
14 version = "1.14.0";
15 pyproject = true;
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "kbr";
21 repo = "fritzconnection";
22 tag = version;
23 hash = "sha256-1LLfSEOKqUIhWIR/RQEG0Bp41d908hAKDlslJlWCHys=";
24 };
25
26 build-system = [ setuptools ];
27
28 dependencies = [ requests ];
29
30 optional-dependencies = {
31 qr = [ segno ];
32 };
33
34 nativeCheckInputs = [ pytestCheckHook ];
35
36 preCheck = ''
37 export HOME=$TEMP
38 '';
39
40 pythonImportsCheck = [ "fritzconnection" ];
41
42 disabledTestPaths = [
43 # Functional tests require network access
44 "fritzconnection/tests/test_functional.py"
45 ];
46
47 meta = with lib; {
48 description = "Python module to communicate with the AVM Fritz!Box";
49 homepage = "https://github.com/kbr/fritzconnection";
50 changelog = "https://fritzconnection.readthedocs.io/en/${version}/sources/version_history.html";
51 license = licenses.mit;
52 maintainers = with maintainers; [
53 dotlambda
54 valodim
55 ];
56 };
57}