Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / fritzconnection / default.nix
blob36d4dbd5b19230e29384d2b6e787192823f745a1
1 { lib
2 , buildPythonPackage
3 , pythonOlder
4 , fetchFromGitHub
5 , pytestCheckHook
6 , requests
7 , segno
8 }:
10 buildPythonPackage rec {
11   pname = "fritzconnection";
12   version = "1.13.2";
13   format = "setuptools";
15   disabled = pythonOlder "3.7";
17   src = fetchFromGitHub {
18     owner = "kbr";
19     repo = pname;
20     rev = "refs/tags/${version}";
21     hash = "sha256-nWXtXhF2pUBxHdrivi4DA7+bFiZPyxb2nqsiN3j4HdI=";
22   };
24   propagatedBuildInputs = [
25     requests
26   ];
28   passthru.optional-dependencies = {
29     qr = [
30       segno
31     ];
32   };
34   nativeCheckInputs = [
35     pytestCheckHook
36   ];
38   preCheck = ''
39     export HOME=$TEMP
40   '';
42   pythonImportsCheck = [
43     "fritzconnection"
44   ];
46   disabledTestPaths = [
47     # Functional tests require network access
48     "fritzconnection/tests/test_functional.py"
49   ];
51   meta = with lib; {
52     description = "Python module to communicate with the AVM Fritz!Box";
53     homepage = "https://github.com/kbr/fritzconnection";
54     changelog = "https://fritzconnection.readthedocs.io/en/${version}/sources/version_history.html";
55     license = licenses.mit;
56     maintainers = with maintainers; [ dotlambda valodim ];
57   };