2021-05-15 22:51:13 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, mock
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
, requests-mock
|
2022-09-16 16:41:36 +00:00
|
|
|
, setuptools
|
2021-05-15 22:51:13 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "py-canary";
|
2022-06-24 08:51:46 +00:00
|
|
|
version = "0.5.3";
|
|
|
|
format = "pyproject";
|
2022-05-08 07:22:01 +00:00
|
|
|
|
2021-05-15 22:51:13 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "snjoetw";
|
|
|
|
repo = pname;
|
2022-05-08 03:15:27 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2022-06-24 08:51:46 +00:00
|
|
|
hash = "sha256-873XAf0jOX5pjrNRELEcTWCauk80FUYxTu7G7jc3MHE=";
|
2021-05-15 22:51:13 +00:00
|
|
|
};
|
|
|
|
|
2022-09-16 16:41:36 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2021-05-15 22:51:13 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2021-05-15 22:51:13 +00:00
|
|
|
mock
|
|
|
|
pytestCheckHook
|
|
|
|
requests-mock
|
|
|
|
];
|
|
|
|
|
2022-05-08 07:22:01 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"canary"
|
|
|
|
];
|
2021-05-15 22:51:13 +00:00
|
|
|
|
2022-06-24 08:51:46 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Test requires network access
|
|
|
|
"test_location_with_motion_entry"
|
|
|
|
];
|
|
|
|
|
2021-05-15 22:51:13 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python package for Canary Security Camera";
|
|
|
|
homepage = "https://github.com/snjoetw/py-canary";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|