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