Merge pull request #224908 from SuperSandro2000/home-assistant-drv

nixos/home-assistant: fix infinite recursion when derivations are used in config
This commit is contained in:
Robert Schütz 2023-04-06 07:56:47 -07:00 committed by GitHub
commit 2b81862da7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,7 +35,10 @@ let
# ...
# } ];
usedPlatforms = config:
if isAttrs config then
# don't recurse into derivations possibly creating an infinite recursion
if isDerivation config then
[ ]
else if isAttrs config then
optional (config ? platform) config.platform
++ concatMap usedPlatforms (attrValues config)
else if isList config then