mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-10-31 02:52:37 +00:00 
			
		
		
		
	fix: pluginOverrides attempting to build
This commit is contained in:
		
					parent
					
						
							
								0435104085
							
						
					
				
			
			
				commit
				
					
						cd98ed56db
					
				
			
		
					 1 changed files with 12 additions and 3 deletions
				
			
		|  | @ -7,9 +7,9 @@ | |||
| }: let | ||||
|   inherit (pkgs) vimPlugins; | ||||
|   inherit (lib.trivial) flip; | ||||
|   inherit (builtins) filter isString; | ||||
|   inherit (builtins) filter isString hasAttr getAttr; | ||||
| 
 | ||||
|   getPin = name: ((pkgs.callPackages ../../../npins/sources.nix {}) // config.vim.pluginOverrides).${name}; | ||||
|   getPin = flip getAttr (pkgs.callPackages ../../../npins/sources.nix {}); | ||||
| 
 | ||||
|   noBuildPlug = pname: let | ||||
|     pin = getPin pname; | ||||
|  | @ -54,7 +54,16 @@ | |||
|   buildConfigPlugins = plugins: | ||||
|     map (plug: | ||||
|       if (isString plug) | ||||
|       then pluginBuilders.${plug} or (noBuildPlug plug) | ||||
|       then | ||||
|         if hasAttr plug config.vim.pluginOverrides | ||||
|         then | ||||
|           (let | ||||
|             plugin = config.vim.pluginOverrides.${plug}; | ||||
|           in | ||||
|             if (lib.isType "flake" plugin) | ||||
|             then plugin // {name = plug;} | ||||
|             else plugin) | ||||
|         else pluginBuilders.${plug} or (noBuildPlug plug) | ||||
|       else plug) ( | ||||
|       filter (f: f != null) plugins | ||||
|     ); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Gerg-L
				Gerg-L