depot/third_party/nixpkgs/pkgs/development/python-modules/p1monitor/default.nix
Default email 555cd8a8f9 Project import generated by Copybara.
GitOrigin-RevId: 5633bcff0c6162b9e4b5f1264264611e950c8ec7
2024-10-09 18:51:18 +02:00

58 lines
1.1 KiB
Nix

{
lib,
aiohttp,
aresponses,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
pytest-asyncio,
pytestCheckHook,
syrupy,
pythonOlder,
yarl,
}:
buildPythonPackage rec {
pname = "p1monitor";
version = "3.1.0";
pyproject = true;
disabled = pythonOlder "3.11";
src = fetchFromGitHub {
owner = "klaasnicolaas";
repo = "python-p1monitor";
rev = "refs/tags/v${version}";
hash = "sha256-vr/JLvn593cgZ2KEsfDW1lS4QlGiymr0qZ8130zo6Ec=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace '"0.0.0"' '"${version}"' \
--replace 'addopts = "--cov"' ""
'';
build-system = [ poetry-core ];
dependencies = [
aiohttp
yarl
];
nativeCheckInputs = [
aresponses
pytest-asyncio
pytestCheckHook
syrupy
];
pythonImportsCheck = [ "p1monitor" ];
meta = with lib; {
description = "Module for interacting with the P1 Monitor";
homepage = "https://github.com/klaasnicolaas/python-p1monitor";
changelog = "https://github.com/klaasnicolaas/python-p1monitor/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}