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