depot/third_party/nixpkgs/pkgs/development/python-modules/aiobiketrax/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

60 lines
1.3 KiB
Nix

{
lib,
aiohttp,
auth0-python,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
pyjwt,
pytest-aiohttp,
pytestCheckHook,
python-dateutil,
pythonOlder,
pythonRelaxDepsHook,
}:
buildPythonPackage rec {
pname = "aiobiketrax";
version = "1.3.0";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "basilfx";
repo = "aiobiketrax";
rev = "refs/tags/v${version}";
hash = "sha256-6hSSPanagYKZxoyU8mp/1bWRcpJJkhNw3Rh82ogKGr4=";
};
postPatch = ''
# https://github.com/basilfx/aiobiketrax/pull/63
substituteInPlace aiobiketrax/api.py \
--replace-fail "auth0.v3" "auth0"
'';
pythonRelaxDeps = [ "auth0-python" ];
build-system = [ poetry-core ];
nativeBuildInputs = [ pythonRelaxDepsHook ];
dependencies = [
aiohttp
auth0-python
python-dateutil
pyjwt
];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "aiobiketrax" ];
meta = with lib; {
description = "Library for interacting with the PowUnity BikeTrax GPS tracker";
homepage = "https://github.com/basilfx/aiobiketrax";
changelog = "https://github.com/basilfx/aiobiketrax/blob/v${version}/CHANGELOG.md";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}