2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
freezegun,
|
2024-07-27 06:49:29 +00:00
|
|
|
ical,
|
2024-05-15 15:35:15 +00:00
|
|
|
mashumaro,
|
|
|
|
poetry-core,
|
|
|
|
pyjwt,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
syrupy,
|
2024-02-29 20:09:43 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aioautomower";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "2024.6.4";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.11";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Thomas55555";
|
|
|
|
repo = "aioautomower";
|
|
|
|
rev = "refs/tags/${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-v+wg/2JRBJ0VgRYOey92WGwVzHmxU9h/ev2oICefaMg=";
|
2024-02-29 20:09:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# Upstream doesn't set a version
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-05-15 15:35:15 +00:00
|
|
|
--replace-fail 'version = "0.0.0"' 'version = "${version}"' \
|
|
|
|
--replace-fail "--cov" ""
|
2024-02-29 20:09:43 +00:00
|
|
|
'';
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [ poetry-core ];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
dependencies = [
|
2024-02-29 20:09:43 +00:00
|
|
|
aiohttp
|
2024-07-27 06:49:29 +00:00
|
|
|
ical
|
2024-02-29 20:09:43 +00:00
|
|
|
mashumaro
|
|
|
|
pyjwt
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
2024-04-21 15:54:59 +00:00
|
|
|
freezegun
|
2024-02-29 20:09:43 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
syrupy
|
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
pythonImportsCheck = [ "aioautomower" ];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
pytestFlagsArray = [ "--snapshot-update" ];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# File is missing
|
|
|
|
"test_standard_mower"
|
|
|
|
];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|