1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2024-12-14 11:57:55 +00:00

rofi: skip override if there are no plugins (#3885)

Avoid needless calls to `override` (also allows using `pkgs.rofi-unwrapped` with no plugins).
This commit is contained in:
Naïm Favier 2023-04-18 12:33:44 +02:00 committed by GitHub
parent 2dcb61d396
commit cd5723734a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -264,8 +264,8 @@ in {
programs.rofi.finalPackage = let
rofiWithPlugins = cfg.package.override
(old: rec { plugins = (old.plugins or [ ]) ++ cfg.plugins; });
in if builtins.hasAttr "override" cfg.package then
(old: { plugins = (old.plugins or [ ]) ++ cfg.plugins; });
in if builtins.hasAttr "override" cfg.package && cfg.plugins != [ ] then
rofiWithPlugins
else
cfg.package;