1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, requests
6, nose
7, mock
8}:
9
10buildPythonPackage rec {
11 pname = "pyfritzhome";
12 version = "0.6.2";
13 disabled = pythonOlder "3.5";
14
15 src = fetchFromGitHub {
16 owner = "hthiery";
17 repo = "python-fritzhome";
18 rev = version;
19 sha256 = "1hwxq9w5qmiky8gpp623nabmydr3yv6hvgzk24fdbmkglfp6ja1v";
20 };
21
22 propagatedBuildInputs = [ requests ];
23
24 checkInputs = [
25 mock
26 nose
27 ];
28
29 checkPhase = ''
30 nosetests
31 '';
32
33 pythonImportsCheck = [ "pyfritzhome" ];
34
35 meta = with lib; {
36 description = "Python Library to access AVM FRITZ!Box homeautomation";
37 homepage = "https://github.com/hthiery/python-fritzhome";
38 license = licenses.mit;
39 maintainers = with maintainers; [ hexa ];
40 };
41}