1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchPypi,
6 pdm-backend,
7 pytz,
8 oauthlib,
9 requests,
10 websocket-client,
11}:
12
13buildPythonPackage rec {
14 pname = "pyfireservicerota";
15 version = "0.0.44";
16 pyproject = true;
17
18 disabled = pythonOlder "3.10";
19
20 src = fetchPypi {
21 inherit pname version;
22 hash = "sha256-OknGX4xP+AHXRuhizbeTVAfiOX0uRGzAly7FJ1vopDI=";
23 };
24
25 postPatch = ''
26 # https://github.com/cyberjunky/python-fireservicerota/pull/1
27 substituteInPlace pyproject.toml \
28 --replace-fail '"aiohttp",' '"requests",' \
29 --replace-fail '"aiohttp_retry",' ""
30 '';
31
32 nativeBuildInputs = [ pdm-backend ];
33
34 propagatedBuildInputs = [
35 pytz
36 oauthlib
37 requests
38 websocket-client
39 ];
40
41 # no tests implemented
42 doCheck = false;
43
44 pythonImportsCheck = [ "pyfireservicerota" ];
45
46 meta = with lib; {
47 description = "Python 3 API wrapper for FireServiceRota/BrandweerRooster";
48 homepage = "https://github.com/cyberjunky/python-fireservicerota";
49 license = licenses.mit;
50 maintainers = with maintainers; [ dotlambda ];
51 };
52}