1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, hatchling
5, httpx
6, pytest-asyncio
7, pytestCheckHook
8, pythonOlder
9, respx
10}:
11
12buildPythonPackage rec {
13 pname = "pywaze";
14 version = "0.5.1";
15 format = "pyproject";
16
17 disabled = pythonOlder "3.8";
18
19 src = fetchFromGitHub {
20 owner = "eifinger";
21 repo = "pywaze";
22 rev = "refs/tags/v${version}";
23 hash = "sha256-r7ROEdgHdjXkveVUbuALHtwCX4IO0lwx9Zo3u6R9I58=";
24 };
25
26 postPatch = ''
27 substituteInPlace pyproject.toml \
28 --replace "--cov --cov-report term-missing --cov=src/pywaze " ""
29 '';
30
31 nativeBuildInputs = [
32 hatchling
33 ];
34
35 propagatedBuildInputs = [
36 httpx
37 ];
38
39 nativeCheckInputs = [
40 pytest-asyncio
41 pytestCheckHook
42 respx
43 ];
44
45 pythonImportsCheck = [
46 "pywaze"
47 ];
48
49 meta = with lib; {
50 description = "Module for calculating WAZE routes and travel times";
51 homepage = "https://github.com/eifinger/pywaze";
52 changelog = "https://github.com/eifinger/pywaze/releases/tag/v${version}";
53 license = licenses.mit;
54 maintainers = with maintainers; [ fab ];
55 };
56}