1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchFromGitHub
5, poetry-core
6, aiohttp
7, async-timeout
8, yarl
9, aresponses
10, pytest-asyncio
11, pytestCheckHook
12}:
13
14buildPythonPackage rec {
15 pname = "here-transit";
16 version = "1.2.0";
17
18 disabled = pythonOlder "3.8";
19
20 format = "pyproject";
21
22 src = fetchFromGitHub {
23 owner = "eifinger";
24 repo = "here_transit";
25 rev = "v${version}";
26 hash = "sha256-C5HZZCmK9ILUUXyx1i/cUggSM3xbOzXiJ13hrT2DWAI=";
27 };
28
29 postPatch = ''
30 sed -i "/^addopts/d" pyproject.toml
31 '';
32
33 nativeBuildInputs = [
34 poetry-core
35 ];
36
37 propagatedBuildInputs = [
38 aiohttp
39 async-timeout
40 yarl
41 ];
42
43 nativeCheckInputs = [
44 aresponses
45 pytest-asyncio
46 pytestCheckHook
47 ];
48
49 pythonImportsCheck = [ "here_transit" ];
50
51 meta = {
52 changelog = "https://github.com/eifinger/here_transit/blob/${src.rev}/CHANGELOG.md";
53 description = "Asynchronous Python client for the HERE Routing V8 API";
54 homepage = "https://github.com/eifinger/here_transit";
55 license = lib.licenses.mit;
56 maintainers = with lib.maintainers; [ dotlambda ];
57 };
58}