mirror of
https://github.com/nix-community/nixvim.git
synced 2026-10-15 02:03:40 -04:00
plugins/efmls: package option defaultText should not depend on pkgs
The `defaultText` was conditional on default. Specifically, `default.meta.platforms`. This is not good, because it means the package must be evaluated in order to build the docs.
This commit is contained in:
@@ -44,10 +44,13 @@ in
|
||||
# Filter package defaults that are not compatible with the current platform
|
||||
(lib.attrsets.mapAttrs (
|
||||
_: opt:
|
||||
if lib.meta.availableOn pkgs.stdenv.hostPlatform opt.default then
|
||||
opt
|
||||
else
|
||||
builtins.removeAttrs opt [ "defaultText" ] // { default = null; }
|
||||
opt
|
||||
// {
|
||||
default = if lib.meta.availableOn pkgs.stdenv.hostPlatform opt.default then opt.default else null;
|
||||
defaultText = lib.literalMD ''
|
||||
`${opt.defaultText.text}` if available on the current system, otherwise null
|
||||
'';
|
||||
}
|
||||
))
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user