2021-01-28 00:26:29 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
2020-07-25 15:59:29 +02:00
|
|
|
, requests
|
2021-01-28 00:26:29 +01:00
|
|
|
, nose
|
|
|
|
, mock
|
|
|
|
}:
|
2020-07-25 15:59:29 +02:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyfritzhome";
|
2021-05-26 12:29:55 +02:00
|
|
|
version = "0.6.1";
|
2020-07-25 15:59:29 +02:00
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
|
2021-01-28 00:26:29 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hthiery";
|
|
|
|
repo = "python-fritzhome";
|
|
|
|
rev = version;
|
2021-05-26 12:29:55 +02:00
|
|
|
sha256 = "sha256-CEoXb7D/8Iksw4aJYNqANkmfhd0yxIIuabaTdWI3RNc=";
|
2020-07-25 15:59:29 +02:00
|
|
|
};
|
|
|
|
|
2021-01-28 00:26:29 +01:00
|
|
|
propagatedBuildInputs = [ requests ];
|
2020-07-25 15:59:29 +02:00
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
mock
|
|
|
|
nose
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
nosetests --with-coverage
|
|
|
|
'';
|
|
|
|
|
2021-01-28 00:26:29 +01:00
|
|
|
pythonImportsCheck = [ "pyfritzhome" ];
|
|
|
|
|
2020-07-25 15:59:29 +02: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 ];
|
|
|
|
};
|
|
|
|
}
|