Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchFromGitHub, 6 poetry-core, 7 aiodns, 8 aiohttp, 9 awesomeversion, 10 backoff, 11 cachetools, 12 mashumaro, 13 orjson, 14 pycountry, 15 yarl, 16 aresponses, 17 pytest-asyncio, 18 pytestCheckHook, 19}: 20 21buildPythonPackage rec { 22 pname = "radios"; 23 version = "0.3.1"; 24 pyproject = true; 25 26 disabled = pythonOlder "3.11"; 27 28 src = fetchFromGitHub { 29 owner = "frenck"; 30 repo = "python-radios"; 31 rev = "v${version}"; 32 hash = "sha256-c0zfpfEdZvjvKtwGcNLLgEkBihhtz/wouHuYRLCxtBY="; 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 pythonRelaxDeps = [ "pycountry" ]; 46 47 propagatedBuildInputs = [ 48 aiodns 49 aiohttp 50 awesomeversion 51 backoff 52 cachetools 53 mashumaro 54 orjson 55 pycountry 56 yarl 57 ]; 58 59 nativeCheckInputs = [ 60 aresponses 61 pytest-asyncio 62 pytestCheckHook 63 ]; 64 65 pythonImportsCheck = [ "radios" ]; 66 67 __darwinAllowLocalNetworking = true; 68 69 meta = with lib; { 70 changelog = "https://github.com/frenck/python-radios/releases/tag/v${version}"; 71 description = "Asynchronous Python client for the Radio Browser API"; 72 homepage = "https://github.com/frenck/python-radios"; 73 license = licenses.mit; 74 maintainers = with maintainers; [ dotlambda ]; 75 }; 76}