1{ lib 2, aiohttp 3, aresponses 4, buildPythonPackage 5, fetchFromGitHub 6, poetry-core 7, pydantic 8, pytestCheckHook 9, pytest-asyncio 10, pythonOlder 11}: 12 13buildPythonPackage rec { 14 pname = "pytraccar"; 15 version = "1.0.0"; 16 format = "pyproject"; 17 18 disabled = pythonOlder "3.8"; 19 20 src = fetchFromGitHub { 21 owner = "ludeeus"; 22 repo = pname; 23 rev = version; 24 hash = "sha256-ngyLe6sbTTQ7n4WdV06OlQnn/vqkD+JUruyMYS1Ym+Q="; 25 }; 26 27 nativeBuildInputs = [ 28 poetry-core 29 ]; 30 31 propagatedBuildInputs = [ 32 aiohttp 33 pydantic 34 ]; 35 36 nativeCheckInputs = [ 37 aresponses 38 pytestCheckHook 39 pytest-asyncio 40 ]; 41 42 pytestFlagsArray = [ 43 "--asyncio-mode=auto" 44 ]; 45 46 postPatch = '' 47 # Upstream doesn't set version in the repo 48 substituteInPlace pyproject.toml \ 49 --replace 'version = "0"' 'version = "${version}"' 50 ''; 51 52 pythonImportsCheck = [ 53 "pytraccar" 54 ]; 55 56 meta = with lib; { 57 description = "Python library to handle device information from Traccar"; 58 homepage = "https://github.com/ludeeus/pytraccar"; 59 license = licenses.mit; 60 maintainers = with maintainers; [ fab ]; 61 }; 62}