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