2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
2020-08-20 17:08:02 +00:00
|
|
|
, requests
|
2021-02-05 17:12:51 +00:00
|
|
|
, nose
|
|
|
|
, mock
|
|
|
|
}:
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyfritzhome";
|
2021-05-28 09:39:13 +00:00
|
|
|
version = "0.6.1";
|
2020-08-20 17:08:02 +00:00
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hthiery";
|
|
|
|
repo = "python-fritzhome";
|
|
|
|
rev = version;
|
2021-05-28 09:39:13 +00:00
|
|
|
sha256 = "sha256-CEoXb7D/8Iksw4aJYNqANkmfhd0yxIIuabaTdWI3RNc=";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
propagatedBuildInputs = [ requests ];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
mock
|
|
|
|
nose
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
nosetests --with-coverage
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
pythonImportsCheck = [ "pyfritzhome" ];
|
|
|
|
|
2020-08-20 17:08:02 +00: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 ];
|
|
|
|
};
|
|
|
|
}
|