nixpkgs/pkgs/development/python-modules/wled/default.nix
Martin Weinelt 8ea6bde88d
treewide: prune pythonOlder 3.10/3.11
This is a post 3.10 removal cleanup.
2026-02-15 04:33:54 +01:00

76 lines
1.3 KiB
Nix

{
lib,
aiohttp,
aresponses,
awesomeversion,
backoff,
buildPythonPackage,
cachetools,
fetchFromGitHub,
mashumaro,
orjson,
poetry-core,
pytest-asyncio,
pytest-cov-stub,
pytest-xdist,
pytestCheckHook,
typer,
yarl,
zeroconf,
}:
buildPythonPackage rec {
pname = "wled";
version = "0.21.0";
pyproject = true;
src = fetchFromGitHub {
owner = "frenck";
repo = "python-wled";
tag = "v${version}";
hash = "sha256-yJ7tiJWSOpkkLwKXo4lYlDrp1FEJ/cGoDaXJamY4ARg=";
};
postPatch = ''
# Upstream doesn't set a version for the pyproject.toml
substituteInPlace pyproject.toml \
--replace-fail "0.0.0" "${version}" \
'';
build-system = [ poetry-core ];
dependencies = [
aiohttp
awesomeversion
backoff
cachetools
mashumaro
orjson
yarl
];
optional-dependencies = {
cli = [
typer
zeroconf
];
};
nativeCheckInputs = [
aresponses
pytest-asyncio
pytest-cov-stub
pytest-xdist
pytestCheckHook
];
pythonImportsCheck = [ "wled" ];
meta = {
description = "Asynchronous Python client for WLED";
homepage = "https://github.com/frenck/python-wled";
changelog = "https://github.com/frenck/python-wled/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ hexa ];
};
}