Files
nixpkgs/pkgs/development/python-modules/pytraccar/default.nix
Martin Weinelt 605b037cc8 python3Packages.pytraccar: 2.1.1 -> 3.0.0
https://github.com/ludeeus/pytraccar/releases/tag/3.0.0

This commit was automatically generated using update-python-libraries.
2025-08-09 19:03:52 +02:00

56 lines
1.2 KiB
Nix

{
lib,
aiohttp,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
pytestCheckHook,
pytest-asyncio,
pythonOlder,
}:
buildPythonPackage rec {
pname = "pytraccar";
version = "3.0.0";
pyproject = true;
disabled = pythonOlder "3.11";
src = fetchFromGitHub {
owner = "ludeeus";
repo = "pytraccar";
tag = version;
hash = "sha256-DtxZCvLuvQpbu/1lIXz2BVbACt5Q1N2txVMyqwd4d9A=";
};
nativeBuildInputs = [ poetry-core ];
propagatedBuildInputs = [ aiohttp ];
# https://github.com/ludeeus/pytraccar/issues/31
doCheck = lib.versionOlder aiohttp.version "3.9.0";
nativeCheckInputs = [
pytestCheckHook
pytest-asyncio
];
pytestFlags = [ "--asyncio-mode=auto" ];
postPatch = ''
# Upstream doesn't set version in the repo
substituteInPlace pyproject.toml \
--replace 'version = "0"' 'version = "${version}"'
'';
pythonImportsCheck = [ "pytraccar" ];
meta = with lib; {
description = "Python library to handle device information from Traccar";
homepage = "https://github.com/ludeeus/pytraccar";
changelog = "https://github.com/ludeeus/pytraccar/releases/tag/${src.tag}";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}