1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, fetchpatch
5, pythonOlder
6, flit
7, async-timeout
8, lxml
9, httpx
10, pytestCheckHook
11, pytest-asyncio
12, pytest-httpx
13}:
14
15buildPythonPackage rec {
16 pname = "pyrmvtransport";
17 version = "0.3.3";
18 format = "pyproject";
19
20 disabled = pythonOlder "3.6";
21
22 src = fetchFromGitHub {
23 owner = "cgtobi";
24 repo = pname;
25 rev = "v${version}";
26 hash = "sha256-nFxGEyO+wyRzPayjjv8WNIJ+XIWbVn0dyyjQKHiyr40=";
27 };
28
29 nativeBuildInputs = [
30 flit
31 ];
32
33 propagatedBuildInputs = [
34 async-timeout
35 httpx
36 lxml
37 ];
38
39 nativeCheckInputs = [
40 pytestCheckHook
41 pytest-asyncio
42 pytest-httpx
43 ];
44
45 patches = [
46 # Can be removed with next release, https://github.com/cgtobi/PyRMVtransport/pull/55
47 (fetchpatch {
48 name = "update-tests.patch";
49 url = "https://github.com/cgtobi/PyRMVtransport/commit/fe93b3d9d625f9ccf8eb7b0c39e0ff41c72d2e77.patch";
50 hash = "sha256-t+GP5VG1S86vVSsisl85ZHBtOqxIi7QS83DA+HgRet4=";
51 })
52 ];
53
54 pythonImportsCheck = [
55 "RMVtransport"
56 ];
57
58 meta = with lib; {
59 homepage = "https://github.com/cgtobi/PyRMVtransport";
60 description = "Get transport information from opendata.rmv.de";
61 license = licenses.mit;
62 maintainers = with maintainers; [ hexa ];
63 };
64}