2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
|
|
|
auth0-python,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
pyjwt,
|
|
|
|
pytestCheckHook,
|
|
|
|
python-dateutil,
|
|
|
|
pythonOlder,
|
2022-08-12 12:06:08 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aiobiketrax";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "1.3.1";
|
2024-06-05 15:53:02 +00:00
|
|
|
pyproject = true;
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "basilfx";
|
2024-06-05 15:53:02 +00:00
|
|
|
repo = "aiobiketrax";
|
2023-04-29 16:46:19 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-N0v5SCTf3NkW/TCSTQL9VkrDj7/GXEejJGFCvJY4pIc=";
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
postPatch = ''
|
|
|
|
# https://github.com/basilfx/aiobiketrax/pull/63
|
|
|
|
substituteInPlace aiobiketrax/api.py \
|
2024-06-05 15:53:02 +00:00
|
|
|
--replace-fail "auth0.v3" "auth0"
|
2023-04-29 16:46:19 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonRelaxDeps = [ "auth0-python" ];
|
2023-04-29 16:46:19 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ poetry-core ];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
dependencies = [
|
2022-08-12 12:06:08 +00:00
|
|
|
aiohttp
|
|
|
|
auth0-python
|
|
|
|
python-dateutil
|
|
|
|
pyjwt
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "aiobiketrax" ];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library for interacting with the PowUnity BikeTrax GPS tracker";
|
|
|
|
homepage = "https://github.com/basilfx/aiobiketrax";
|
2022-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/basilfx/aiobiketrax/blob/v${version}/CHANGELOG.md";
|
2022-08-12 12:06:08 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|