* Allow the output/expression id to be forced to a certain
value; this potentially dangerous feature enables better sharing for those paths for which the content is known in advance (e.g., because a content hash is given). * Fast builds: if we can expand all output paths of a derive expression, we don't have to build.
This commit is contained in:
		
							parent
							
								
									49231fbe41
								
							
						
					
					
						commit
						249988a787
					
				
					 6 changed files with 23 additions and 17 deletions
				
			
		|  | @ -31,9 +31,10 @@ ATerm termFromId(const FSId & id) | |||
| } | ||||
| 
 | ||||
| 
 | ||||
| FSId writeTerm(ATerm t, const string & suffix) | ||||
| FSId writeTerm(ATerm t, const string & suffix, FSId id) | ||||
| { | ||||
|     FSId id = hashTerm(t); | ||||
|     /* By default, the id of a term is its hash. */ | ||||
|     if (id == FSId()) id = hashTerm(t); | ||||
| 
 | ||||
|     string path = canonPath(nixStore + "/" +  | ||||
|         (string) id + suffix + ".nix"); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue