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