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