2021-09-26 12:46:18 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
2022-02-10 20:34:41 +00:00
|
|
|
, aresponses
|
2021-09-26 12:46:18 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, poetry-core
|
2022-02-10 20:34:41 +00:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
2021-09-26 12:46:18 +00:00
|
|
|
, pythonOlder
|
|
|
|
, yarl
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "p1monitor";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "2.3.1";
|
2021-09-26 12:46:18 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2021-09-26 12:46:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "klaasnicolaas";
|
|
|
|
repo = "python-p1monitor";
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-2NlFXeI+6ooh4D1OxUWwYrmM4zpL9gg8vhnseLjj2dM=";
|
2021-09-26 12:46:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
yarl
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-02-10 20:34:41 +00:00
|
|
|
aresponses
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2021-09-26 12:46:18 +00:00
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace '"0.0.0"' '"${version}"' \
|
|
|
|
--replace 'addopts = "--cov"' ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"p1monitor"
|
|
|
|
];
|
2021-09-26 12:46:18 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2022-02-20 05:27:41 +00:00
|
|
|
description = "Module for interacting with the P1 Monitor";
|
2021-09-26 12:46:18 +00:00
|
|
|
homepage = "https://github.com/klaasnicolaas/python-p1monitor";
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/klaasnicolaas/python-p1monitor/releases/tag/v${version}";
|
2021-09-26 12:46:18 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|