1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchFromGitHub
5, poetry-core
6, aiodns
7, aiohttp
8, awesomeversion
9, backoff
10, cachetools
11, mashumaro
12, orjson
13, pycountry
14, yarl
15, aresponses
16, pytest-asyncio
17, pytestCheckHook
18}:
19
20buildPythonPackage rec {
21 pname = "radios";
22 version = "0.3.0";
23 pyproject = true;
24
25 disabled = pythonOlder "3.11";
26
27
28 src = fetchFromGitHub {
29 owner = "frenck";
30 repo = "python-radios";
31 rev = "v${version}";
32 hash = "sha256-bzo+SA8kqc2GcxSV0TiIJyPVG+JshdsMoXSUhZYSphU=";
33 };
34
35 postPatch = ''
36 substituteInPlace pyproject.toml \
37 --replace "0.0.0" "${version}" \
38 --replace "--cov" ""
39 '';
40
41 nativeBuildInputs = [
42 poetry-core
43 ];
44
45 propagatedBuildInputs = [
46 aiodns
47 aiohttp
48 awesomeversion
49 backoff
50 cachetools
51 mashumaro
52 orjson
53 pycountry
54 yarl
55 ];
56
57 nativeCheckInputs = [
58 aresponses
59 pytest-asyncio
60 pytestCheckHook
61 ];
62
63 pythonImportsCheck = [ "radios" ];
64
65 __darwinAllowLocalNetworking = true;
66
67 meta = with lib; {
68 description = "Asynchronous Python client for the Radio Browser API";
69 homepage = "https://github.com/frenck/python-radios";
70 license = licenses.mit;
71 maintainers = with maintainers; [ dotlambda ];
72 };
73}