2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
2024-07-27 06:49:29 +00:00
|
|
|
fetchFromGitHub,
|
2024-06-05 15:53:02 +00:00
|
|
|
|
|
|
|
# build-system
|
|
|
|
setuptools,
|
|
|
|
|
|
|
|
# dependencies
|
|
|
|
aiohttp,
|
|
|
|
requests,
|
|
|
|
pytz,
|
|
|
|
|
|
|
|
# tests
|
|
|
|
mock,
|
|
|
|
pytest-aiohttp,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
2024-04-21 15:54:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyindego";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "3.2.1";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jm-73";
|
|
|
|
repo = "pyIndego";
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-wPQocacWwWjEH4boMZ33aW/NPvdD6LSmMTFXGwBwwq8=";
|
2024-04-21 15:54:59 +00:00
|
|
|
};
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i "/addopts/d" pytest.ini
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ setuptools ];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
aiohttp
|
|
|
|
requests
|
|
|
|
pytz
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
mock
|
|
|
|
pytest-aiohttp
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Typeerror, presumably outdated tests
|
|
|
|
"test_repr"
|
|
|
|
"test_client_response_errors"
|
|
|
|
"test_update_battery"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "pyIndego" ];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python interface for Bosch API for lawnmowers";
|
|
|
|
homepage = "https://github.com/jm-73/pyIndego";
|
|
|
|
changelog = "https://github.com/jm-73/pyIndego/blob/${version}/CHANGELOG.md";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|