|
102 | 102 | removeDependencies = ps: map (p: p // { plugin = removeAttrs p.plugin [ "dependencies" ]; }) ps;
|
103 | 103 |
|
104 | 104 | # Separated start and opt plugins
|
105 |
| - partitionedPlugins = builtins.partition (p: p.optional) allPlugins; |
106 |
| - startPlugins = partitionedPlugins.wrong; |
| 105 | + partitionedOptStartPlugins = builtins.partition (p: p.optional) allPlugins; |
| 106 | + startPlugins = partitionedOptStartPlugins.wrong; |
107 | 107 | # Remove opt plugin dependencies since they are already available in start plugins
|
108 |
| - optPlugins = removeDependencies partitionedPlugins.right; |
| 108 | + optPlugins = removeDependencies partitionedOptStartPlugins.right; |
109 | 109 |
|
110 | 110 | # Test if plugin shouldn't be included in plugin pack
|
111 | 111 | isStandalone =
|
|
114 | 114 | || builtins.elem (lib.getName p.plugin) config.performance.combinePlugins.standalonePlugins;
|
115 | 115 |
|
116 | 116 | # Separated standalone and combined start plugins
|
117 |
| - partitionedStartPlugins = builtins.partition isStandalone startPlugins; |
118 |
| - toCombinePlugins = partitionedStartPlugins.wrong; |
| 117 | + partitionedStandaloneStartPlugins = builtins.partition isStandalone startPlugins; |
| 118 | + toCombinePlugins = partitionedStandaloneStartPlugins.wrong; |
119 | 119 | # Remove standalone plugin dependencies since they are already available in start plugins
|
120 |
| - standaloneStartPlugins = removeDependencies partitionedStartPlugins.right; |
| 120 | + standaloneStartPlugins = removeDependencies partitionedStandaloneStartPlugins.right; |
121 | 121 |
|
122 | 122 | # Combine start plugins into a single pack
|
123 | 123 | pluginPack =
|
124 | 124 | let
|
125 |
| - # Plugins with doc tags removed |
| 125 | + # Every plugin has its own generated help tags (doc/tags) |
| 126 | + # Remove them to avoid collisions, new help tags |
| 127 | + # will be generate for the entire pack later on |
126 | 128 | overriddenPlugins = map (
|
127 | 129 | plugin:
|
128 | 130 | plugin.plugin.overrideAttrs (prev: {
|
129 | 131 | nativeBuildInputs = lib.remove pkgs.vimUtils.vimGenDocHook prev.nativeBuildInputs or [ ];
|
130 |
| - configurePhase = builtins.concatStringsSep "\n" ( |
131 |
| - builtins.filter (s: s != ":") [ |
132 |
| - prev.configurePhase or ":" |
133 |
| - "rm -vf doc/tags" |
134 |
| - ] |
135 |
| - ); |
| 132 | + configurePhase = '' |
| 133 | + ${prev.configurePhase or ""} |
| 134 | + rm -vf doc/tags''; |
136 | 135 | })
|
137 | 136 | ) toCombinePlugins;
|
138 | 137 |
|
|
0 commit comments