aboutsummaryrefslogtreecommitdiff
path: root/pkgs/servers/home-assistant
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2020-08-29 00:05:23 +0200
committerJon <jonringer@users.noreply.github.com>2020-08-29 17:37:55 -0700
commitcc4fd57df93da02574fdcd79915135428f843898 (patch)
tree2e3b1e47f0ff527edff9ba95f755b5dc811e0ef9 /pkgs/servers/home-assistant
parent67b7baa58081d2497347ab8c46e1909aa407910f (diff)
home-assistant: find packages that use extra_require
Diffstat (limited to 'pkgs/servers/home-assistant')
-rw-r--r--pkgs/servers/home-assistant/component-packages.nix2
-rwxr-xr-xpkgs/servers/home-assistant/parse-requirements.py4
2 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix
index 1bf4c3bd9509..a392c30b21cf 100644
--- a/pkgs/servers/home-assistant/component-packages.nix
+++ b/pkgs/servers/home-assistant/component-packages.nix
@@ -683,7 +683,7 @@
"safe_mode" = ps: with ps; [ aiohttp-cors hass-nabucasa]; # missing inputs: home-assistant-frontend
"saj" = ps: with ps; [ ]; # missing inputs: pysaj
"salt" = ps: with ps; [ ]; # missing inputs: saltbox
- "samsungtv" = ps: with ps; [ ]; # missing inputs: samsungctl[websocket] samsungtvws[websocket]
+ "samsungtv" = ps: with ps; [ samsungctl samsungtvws];
"satel_integra" = ps: with ps; [ ]; # missing inputs: satel_integra
"scene" = ps: with ps; [ ];
"schluter" = ps: with ps; [ ]; # missing inputs: py-schluter
diff --git a/pkgs/servers/home-assistant/parse-requirements.py b/pkgs/servers/home-assistant/parse-requirements.py
index 3c6d0c4bcabc..502ea7d6c1e3 100755
--- a/pkgs/servers/home-assistant/parse-requirements.py
+++ b/pkgs/servers/home-assistant/parse-requirements.py
@@ -113,6 +113,10 @@ def name_to_attr_path(req: str, packages: Dict[str, Dict[str, str]]) -> Optional
# instead of python-3.6-python-mpd2 inside Nixpkgs
if req.startswith("python-") or req.startswith("python_"):
names.append(req[len("python-") :])
+ # Add name variant without extra_require, e.g. samsungctl
+ # instead of samsungctl[websocket]
+ if req.endswith("]"):
+ names.append(req[:req.find("[")])
for name in names:
# treat "-" and "_" equally
name = re.sub("[-_]", "[-_]", name)