mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 17:03:01 +00:00
python312Packages.wled: refactor
- add optional-dependencies
(cherry picked from commit 4e30caab80
)
This commit is contained in:
parent
3716399b39
commit
8ff499b1d9
@ -1,24 +1,26 @@
|
||||
{
|
||||
lib,
|
||||
aiohttp,
|
||||
aresponses,
|
||||
awesomeversion,
|
||||
backoff,
|
||||
buildPythonPackage,
|
||||
cachetools,
|
||||
fetchFromGitHub,
|
||||
poetry-core,
|
||||
yarl,
|
||||
aresponses,
|
||||
pytest-asyncio,
|
||||
pytest-xdist,
|
||||
pytestCheckHook,
|
||||
pythonOlder,
|
||||
typer,
|
||||
yarl,
|
||||
zeroconf,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "wled";
|
||||
version = "0.18.0";
|
||||
format = "pyproject";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.11";
|
||||
|
||||
@ -32,13 +34,13 @@ buildPythonPackage rec {
|
||||
postPatch = ''
|
||||
# Upstream doesn't set a version for the pyproject.toml
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace "0.0.0" "${version}" \
|
||||
--replace "--cov" ""
|
||||
--replace-fail "0.0.0" "${version}" \
|
||||
--replace-fail "--cov" ""
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ poetry-core ];
|
||||
build-system = [ poetry-core ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
dependencies = [
|
||||
aiohttp
|
||||
awesomeversion
|
||||
backoff
|
||||
@ -46,6 +48,13 @@ buildPythonPackage rec {
|
||||
yarl
|
||||
];
|
||||
|
||||
passthru.optional-dependencies = {
|
||||
cli = [
|
||||
typer
|
||||
zeroconf
|
||||
];
|
||||
};
|
||||
|
||||
nativeCheckInputs = [
|
||||
aresponses
|
||||
pytest-asyncio
|
||||
|
Loading…
Reference in New Issue
Block a user