diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 9135ea549f3..429f140f738 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -243,7 +243,7 @@ "familyhub" = ps: with ps; [ ]; # missing inputs: python-family-hub-local "fan" = ps: with ps; [ ]; "fastdotcom" = ps: with ps; [ ]; # missing inputs: fastdotcom - "feedreader" = ps: with ps; [ ]; # missing inputs: feedparser-homeassistant + "feedreader" = ps: with ps; [ feedparser]; "ffmpeg" = ps: with ps; [ ha-ffmpeg ]; "ffmpeg_motion" = ps: with ps; [ ha-ffmpeg ]; "ffmpeg_noise" = ps: with ps; [ ha-ffmpeg ]; diff --git a/pkgs/servers/home-assistant/parse-requirements.py b/pkgs/servers/home-assistant/parse-requirements.py index 4fa4b8a48ee..3d25dfeaf84 100755 --- a/pkgs/servers/home-assistant/parse-requirements.py +++ b/pkgs/servers/home-assistant/parse-requirements.py @@ -41,6 +41,10 @@ PKG_PREFERENCES = { "tensorflow-build_2": "tensorflow", } +# packages we have a different name for or we want to replace +PKG_SUBSTITUTES = { + "feedparser-homeassistant": "feedparser" +} def run_mypy() -> None: cmd = ["mypy", "--ignore-missing-imports", __file__] @@ -156,6 +160,8 @@ def main() -> None: # Therefore, if there's a "#" in the line, only take the part after it req = req[req.find("#") + 1 :] name = req.split("==")[0] + name = PKG_SUBSTITUTES.get(name, name) + attr_path = name_to_attr_path(name, packages) if attr_path is not None: # Add attribute path without "python3Packages." prefix