ca5ab3a501
GitOrigin-RevId: 4a01ca36d6bfc133bc617e661916a81327c9bbc8
51 lines
979 B
Nix
51 lines
979 B
Nix
{ lib
|
|
, aiohttp
|
|
, aresponses
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pytestCheckHook
|
|
, pytest-asyncio
|
|
, pythonOlder
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pytraccar";
|
|
version = "0.10.1";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ludeeus";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "sha256-fqf7sckvq5GebgpDVVSgwHISu4/wntjc/WF9LFlXN2w=";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|