nix build: Use Nix search path
That is, unless --file is specified, the Nix search path is synthesized into an attribute set. Thus you can say $ nix build nixpkgs.hello assuming $NIX_PATH contains an entry of the form "nixpkgs=...". This is more verbose than $ nix build hello but is less ambiguous.
This commit is contained in:
		
							parent
							
								
									22d6e31fc6
								
							
						
					
					
						commit
						d74236d1f2
					
				
					 5 changed files with 57 additions and 13 deletions
				
			
		|  | @ -128,9 +128,8 @@ static void getAllExprs(EvalState & state, | |||
|             } | ||||
|             attrs.insert(attrName); | ||||
|             /* Load the expression on demand. */ | ||||
|             Value & vFun(*state.allocValue()); | ||||
|             Value & vFun = state.getBuiltin("import"); | ||||
|             Value & vArg(*state.allocValue()); | ||||
|             state.getBuiltin("import", vFun); | ||||
|             mkString(vArg, path2); | ||||
|             if (v.attrs->size() == v.attrs->capacity()) | ||||
|                 throw Error(format("too many Nix expressions in directory ‘%1%’") % path); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue