depot/third_party/nixpkgs/pkgs/development/python-modules/radios/default.nix
Default email 657f08b14c Project import generated by Copybara.
GitOrigin-RevId: 807e9154dcb16384b1b765ebe9cd2bba2ac287fd
2024-10-29 11:11:06 +00:00

75 lines
1.4 KiB
Nix

{
lib,
buildPythonPackage,
pythonOlder,
fetchFromGitHub,
poetry-core,
aiodns,
aiohttp,
awesomeversion,
backoff,
cachetools,
mashumaro,
orjson,
pycountry,
yarl,
aresponses,
pytest-asyncio,
pytest-cov-stub,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "radios";
version = "0.3.2";
pyproject = true;
disabled = pythonOlder "3.11";
src = fetchFromGitHub {
owner = "frenck";
repo = "python-radios";
rev = "refs/tags/v${version}";
hash = "sha256-GXiLwwjZ/pN3HquzLLWq/2EfhmrJyCXq0sovIGRB3uQ=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail 'version = "0.0.0"' 'version = "${version}"'
'';
build-system = [
poetry-core
];
dependencies = [
aiodns
aiohttp
awesomeversion
backoff
cachetools
mashumaro
orjson
pycountry
yarl
];
nativeCheckInputs = [
aresponses
pytest-asyncio
pytest-cov-stub
pytestCheckHook
];
pythonImportsCheck = [ "radios" ];
__darwinAllowLocalNetworking = true;
meta = with lib; {
changelog = "https://github.com/frenck/python-radios/releases/tag/v${version}";
description = "Asynchronous Python client for the Radio Browser API";
homepage = "https://github.com/frenck/python-radios";
license = licenses.mit;
maintainers = with maintainers; [ dotlambda ];
};
}