Something went wrong. Try again.
forked from nix-community/nixvim
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061{ lib, config, pkgs, ...}:let inherit (import ./utils.nix lib) normalizedPluginType normalizePlugins ; byteCompileCfg = config.performance.byteCompileLua;in{ options = { build.plugins = lib.mkOption { visible = false; internal = true; readOnly = true; type = lib.types.listOf normalizedPluginType; description = '' Final list of (normalized) plugins that will be passed to the wrapper.
It notably implements: - byte-compilation (performance.byteCompileLua) -> ./byte-compile-plugins.nix - plugins combining (performance.combinePlugins) -> ./combine-plugins.nix ''; }; };
config = { build.plugins = let shouldCompilePlugins = byteCompileCfg.enable && byteCompileCfg.plugins; byteCompilePlugins = pkgs.callPackage ./byte-compile-plugins.nix { inherit lib; inherit (config.performance.byteCompileLua) excludedPlugins; };
shouldCompileLuaLib = byteCompileCfg.enable && byteCompileCfg.luaLib; inherit (pkgs.callPackage ./byte-compile-lua-lib.nix { inherit lib; }) byteCompilePluginDeps;
shouldCombinePlugins = config.performance.combinePlugins.enable; combinePlugins = pkgs.callPackage ./combine-plugins.nix { inherit lib; inherit (config.performance.combinePlugins) standalonePlugins pathsToLink ; }; in
lib.pipe config.extraPlugins ( [ normalizePlugins ] ++ lib.optionals shouldCompilePlugins [ byteCompilePlugins ] ++ lib.optionals shouldCompileLuaLib [ byteCompilePluginDeps ] ++ lib.optionals shouldCombinePlugins [ combinePlugins ] ); };}