2021-01-27 23:26:29 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
2020-07-25 14:59:29 +01:00
|
|
|
, requests
|
2021-01-27 23:26:29 +00:00
|
|
|
, nose
|
|
|
|
, mock
|
|
|
|
}:
|
2020-07-25 14:59:29 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyfritzhome";
|
2021-01-27 23:26:29 +00:00
|
|
|
version = "0.6.0";
|
2020-07-25 14:59:29 +01:00
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
|
2021-01-27 23:26:29 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hthiery";
|
|
|
|
repo = "python-fritzhome";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "1wzys84hxrjcg86fcn7f7i2i6979qwcpny2afk5rvwljh8f7bli5";
|
2020-07-25 14:59:29 +01:00
|
|
|
};
|
|
|
|
|
2021-01-27 23:26:29 +00:00
|
|
|
propagatedBuildInputs = [ requests ];
|
2020-07-25 14:59:29 +01:00
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
mock
|
|
|
|
nose
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
nosetests --with-coverage
|
|
|
|
'';
|
|
|
|
|
2021-01-27 23:26:29 +00:00
|
|
|
pythonImportsCheck = [ "pyfritzhome" ];
|
|
|
|
|
2020-07-25 14:59:29 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python Library to access AVM FRITZ!Box homeautomation";
|
|
|
|
homepage = "https://github.com/hthiery/python-fritzhome";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|