2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
aiodns,
|
|
|
|
aiohttp,
|
|
|
|
awesomeversion,
|
|
|
|
backoff,
|
|
|
|
cachetools,
|
|
|
|
mashumaro,
|
|
|
|
orjson,
|
|
|
|
pycountry,
|
|
|
|
yarl,
|
|
|
|
aresponses,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
2022-03-05 16:20:37 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "radios";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.3.1";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
2022-03-05 16:20:37 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
disabled = pythonOlder "3.11";
|
2022-03-05 16:20:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "frenck";
|
|
|
|
repo = "python-radios";
|
|
|
|
rev = "v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-c0zfpfEdZvjvKtwGcNLLgEkBihhtz/wouHuYRLCxtBY=";
|
2022-03-05 16:20:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace "0.0.0" "${version}" \
|
|
|
|
--replace "--cov" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
2024-04-21 15:54:59 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonRelaxDeps = [ "pycountry" ];
|
2022-03-05 16:20:37 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiodns
|
|
|
|
aiohttp
|
|
|
|
awesomeversion
|
|
|
|
backoff
|
|
|
|
cachetools
|
2024-01-02 11:29:13 +00:00
|
|
|
mashumaro
|
|
|
|
orjson
|
2022-03-05 16:20:37 +00:00
|
|
|
pycountry
|
|
|
|
yarl
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2024-01-02 11:29:13 +00:00
|
|
|
aresponses
|
2022-03-05 16:20:37 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "radios" ];
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
meta = with lib; {
|
2024-04-21 15:54:59 +00:00
|
|
|
changelog = "https://github.com/frenck/python-radios/releases/tag/v${version}";
|
2022-03-05 16:20:37 +00:00
|
|
|
description = "Asynchronous Python client for the Radio Browser API";
|
|
|
|
homepage = "https://github.com/frenck/python-radios";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|