git.iko.soy/typeable/nixpkgs
on master help sign in
home-assistant: find packages that use extra_require
commitcc4fd57df93da02574fdcd79915135428f843898 authorMartin Weinelt <hexa@darmstadt.ccc.de> dateSat 29 Aug 2020, 00:05 (6 years ago) parent67b7baa
2 files changed+5−1
pkgs/servers/home-assistant/component-packages.nix+1−1 pkgs/servers/home-assistant/parse-requirements.py+4
pkgs/servers/home-assistant/component-packages.nix+1−1
@@ -683,7 +683,7 @@
683683 "safe_mode" = ps: with ps; [ aiohttp-cors hass-nabucasa]; # missing inputs: home-assistant-frontend
684684 "saj" = ps: with ps; [ ]; # missing inputs: pysaj
685685 "salt" = ps: with ps; [ ]; # missing inputs: saltbox
686− "samsungtv" = ps: with ps; [ ]; # missing inputs: samsungctl[websocket] samsungtvws[websocket]
686+ "samsungtv" = ps: with ps; [ samsungctl samsungtvws];
687687 "satel_integra" = ps: with ps; [ ]; # missing inputs: satel_integra
688688 "scene" = ps: with ps; [ ];
689689 "schluter" = ps: with ps; [ ]; # missing inputs: py-schluter
pkgs/servers/home-assistant/parse-requirements.py+4
@@ -113,6 +113,10 @@ def name_to_attr_path(req: str, packages: Dict[str, Dict[str, str]]) -> Optional
113113 # instead of python-3.6-python-mpd2 inside Nixpkgs
114114 if req.startswith("python-") or req.startswith("python_"):
115115 names.append(req[len("python-") :])
116+ # Add name variant without extra_require, e.g. samsungctl
117+ # instead of samsungctl[websocket]
118+ if req.endswith("]"):
119+ names.append(req[:req.find("[")])
116120 for name in names:
117121 # treat "-" and "_" equally
118122 name = re.sub("[-_]", "[-_]", name)