1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-08 11:35:37 +03:00

home-assistant: Inject extra dependencies through PYTHONPATH

Injecting configuration specific dependencies into the
propagatedBuildInputs of the home-assistant package forces alot of
rebuilds while setting up home-assistant, which is annoying.

By passing optional dependencies into home-assistant via the systemd
units PYTHONPATH environment variable, only he concatenation of
library paths in the systemd unit requires a rebuild.

This also means users can rely heavily on the cached home-assistant
package and will rarely have to build from source, if ever.
This commit is contained in:
Martin Weinelt 2023-02-20 16:54:37 +01:00
parent 3fa7dc206a
commit e01ccd6245
No known key found for this signature in database
GPG key ID: 87C1E9888F856759
2 changed files with 3 additions and 1 deletions

View file

@ -409,6 +409,7 @@ in {
(optionalString (cfg.config != null) copyConfig) +
(optionalString (cfg.lovelaceConfig != null) copyLovelaceConfig)
;
environment.PYTHONPATH = package.pythonPath;
serviceConfig = let
# List of capabilities to equip home-assistant with, depending on configured components
capabilities = lib.unique ([