ce641f4048
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
51 lines
980 B
Nix
51 lines
980 B
Nix
{ lib
|
|
, aiohttp
|
|
, aresponses
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pytestCheckHook
|
|
, pytest-asyncio
|
|
, pythonOlder
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pytraccar";
|
|
version = "0.10.0";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ludeeus";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "08f7rwvbc1h17lvgv9823ssd3p0vw7yzsg40lbkacgqqiv1hxfzs";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
aiohttp
|
|
];
|
|
|
|
checkInputs = [
|
|
aresponses
|
|
pytestCheckHook
|
|
pytest-asyncio
|
|
];
|
|
|
|
postPatch = ''
|
|
# Upstream doesn't set version in the repo
|
|
substituteInPlace setup.py \
|
|
--replace 'version="master",' 'version="${version}",'
|
|
'';
|
|
|
|
pythonImportsCheck = [
|
|
"pytraccar"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Python library to handle device information from Traccar";
|
|
homepage = "https://github.com/ludeeus/pytraccar";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|