1{
2 lib,
3 aiohttp,
4 async-timeout,
5 buildPythonPackage,
6 fetchFromGitHub,
7 poetry-core,
8 pythonOlder,
9}:
10
11buildPythonPackage rec {
12 pname = "enturclient";
13 version = "0.2.4";
14 disabled = pythonOlder "3.8";
15
16 format = "pyproject";
17
18 src = fetchFromGitHub {
19 owner = "hfurubotten";
20 repo = pname;
21 rev = "v${version}";
22 hash = "sha256-Y2sBPikCAxumylP1LUy8XgjBRCWaNryn5XHSrRjJIIo=";
23 };
24
25 nativeBuildInputs = [ poetry-core ];
26
27 propagatedBuildInputs = [
28 aiohttp
29 async-timeout
30 ];
31
32 postPatch = ''
33 substituteInPlace pyproject.toml \
34 --replace 'async_timeout = "^3.0.1"' 'async_timeout = ">=3.0.1"'
35 '';
36
37 # Project has no tests
38 doCheck = false;
39
40 pythonImportsCheck = [ "enturclient" ];
41
42 meta = with lib; {
43 description = "Python library for interacting with the Entur.org API";
44 homepage = "https://github.com/hfurubotten/enturclient";
45 license = with licenses; [ mit ];
46 maintainers = with maintainers; [ fab ];
47 };
48}