2021-03-23 19:22:30 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, aresponses
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-10-09 19:29:22 +00:00
|
|
|
, fetchpatch
|
2021-03-23 19:22:30 +00:00
|
|
|
, poetry-core
|
2023-05-24 13:37:59 +00:00
|
|
|
, pydantic
|
2021-03-23 19:22:30 +00:00
|
|
|
, pytest-aiohttp
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-cov
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aionotion";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "2023.05.5";
|
2021-03-23 19:22:30 +00:00
|
|
|
format = "pyproject";
|
2022-10-30 15:09:59 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-03-23 19:22:30 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bachya";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-/2sF8m5R8YXkP89bi5zR3h13r5LrFOl1OsixAcX0D4o=";
|
2021-03-23 19:22:30 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
patches = [
|
|
|
|
# This patch removes references to setuptools and wheel that are no longer
|
|
|
|
# necessary and changes poetry to poetry-core, so that we don't need to add
|
|
|
|
# unnecessary nativeBuildInputs.
|
|
|
|
#
|
|
|
|
# https://github.com/bachya/aionotion/pull/269
|
|
|
|
#
|
|
|
|
(fetchpatch {
|
|
|
|
name = "clean-up-build-dependencies.patch";
|
|
|
|
url = "https://github.com/bachya/aionotion/commit/53c7285110d12810f9b43284295f71d052a81b83.patch";
|
|
|
|
hash = "sha256-RLRbHmaR2A8MNc96WHx0L8ccyygoBUaOulAuRJkFuUM=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
2021-03-23 19:22:30 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
2023-05-24 13:37:59 +00:00
|
|
|
pydantic
|
2021-03-23 19:22:30 +00:00
|
|
|
];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-03-23 19:22:30 +00:00
|
|
|
aresponses
|
|
|
|
pytest-aiohttp
|
|
|
|
pytest-asyncio
|
|
|
|
pytest-cov
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
"examples"
|
|
|
|
];
|
2021-03-23 19:22:30 +00:00
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"aionotion"
|
|
|
|
];
|
2021-03-23 19:22:30 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library for Notion Home Monitoring";
|
|
|
|
homepage = "https://github.com/bachya/aionotion";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|