depot/third_party/nixpkgs/pkgs/development/python-modules/aioautomower/default.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

72 lines
1.4 KiB
Nix

{
lib,
aiohttp,
buildPythonPackage,
fetchFromGitHub,
freezegun,
ical,
mashumaro,
poetry-core,
pyjwt,
pytest-asyncio,
pytestCheckHook,
pythonOlder,
syrupy,
}:
buildPythonPackage rec {
pname = "aioautomower";
version = "2024.9.3";
pyproject = true;
disabled = pythonOlder "3.11";
src = fetchFromGitHub {
owner = "Thomas55555";
repo = "aioautomower";
rev = "refs/tags/${version}";
hash = "sha256-2jPQcMD05SUYnBwAaWHbGKXy7Du2JKPVq3eui9YaqxI=";
};
postPatch = ''
# Upstream doesn't set a version
substituteInPlace pyproject.toml \
--replace-fail 'version = "0.0.0"' 'version = "${version}"' \
--replace-fail "--cov" ""
'';
build-system = [ poetry-core ];
dependencies = [
aiohttp
ical
mashumaro
pyjwt
];
nativeCheckInputs = [
freezegun
pytest-asyncio
pytestCheckHook
syrupy
];
pythonImportsCheck = [ "aioautomower" ];
pytestFlagsArray = [ "--snapshot-update" ];
disabledTests = [
# File is missing
"test_standard_mower"
# Call no found
"test_post_commands"
];
meta = with lib; {
description = "Module to communicate with the Automower Connect API";
homepage = "https://github.com/Thomas55555/aioautomower";
changelog = "https://github.com/Thomas55555/aioautomower/releases/tag/${version}";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}