depot/third_party/nixpkgs/pkgs/development/python-modules/aioautomower/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

68 lines
1.3 KiB
Nix

{
lib,
aiohttp,
buildPythonPackage,
fetchFromGitHub,
freezegun,
mashumaro,
poetry-core,
pyjwt,
pytest-asyncio,
pytestCheckHook,
pythonOlder,
syrupy,
}:
buildPythonPackage rec {
pname = "aioautomower";
version = "2024.5.1";
pyproject = true;
disabled = pythonOlder "3.11";
src = fetchFromGitHub {
owner = "Thomas55555";
repo = "aioautomower";
rev = "refs/tags/${version}";
hash = "sha256-SwRr8BJOchQ7qObgVkNGTkaFEx7wiB/EPedRG2csH+A=";
};
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
mashumaro
pyjwt
];
nativeCheckInputs = [
freezegun
pytest-asyncio
pytestCheckHook
syrupy
];
pythonImportsCheck = [ "aioautomower" ];
pytestFlagsArray = [ "--snapshot-update" ];
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 ];
};
}