mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-01 12:54:30 +02:00
lib: Harmonize package options which may not exist in nixpkgs
This commit is contained in:
parent
eb611349a7
commit
a2f01876f7
6 changed files with 57 additions and 42 deletions
|
@ -100,7 +100,6 @@
|
|||
|
||||
with-sources =
|
||||
{
|
||||
config,
|
||||
options,
|
||||
lib,
|
||||
pkgs,
|
||||
|
@ -158,8 +157,10 @@
|
|||
# Enable unless disabled above
|
||||
enable = !(lib.elem sourceName disabled);
|
||||
}
|
||||
# Some sources have a package option with no default
|
||||
// lib.optionalAttrs (opts ? package && !(opts.package ? default)) { package = null; }
|
||||
# Some sources are defined using mkUnpackagedOption whose default will throw
|
||||
// lib.optionalAttrs (opts ? package && !(builtins.tryEval opts.package.default).success) {
|
||||
package = null;
|
||||
}
|
||||
)
|
||||
) options.plugins.none-ls.sources;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue