* If store paths are specified as sources in Nix expressions, don't
copy them, but use them directly.
This commit is contained in:
		
							parent
							
								
									f9848d4f31
								
							
						
					
					
						commit
						10c429c757
					
				
					 1 changed files with 18 additions and 8 deletions
				
			
		|  | @ -125,6 +125,15 @@ static void processBinding(EvalState & state, Expr e, Derivation & drv, | |||
| 
 | ||||
|     else if (matchPath(e, s)) { | ||||
|         Path srcPath(canonPath(aterm2String(s))); | ||||
| 
 | ||||
|         if (isStorePath(srcPath)) { | ||||
|             printMsg(lvlChatty, format("using store path `%1%' as source") | ||||
|                 % srcPath); | ||||
|             drv.inputSrcs.insert(srcPath); | ||||
|             ss.push_back(srcPath); | ||||
|         } | ||||
| 
 | ||||
|         else { | ||||
|             if (isDerivation(srcPath)) | ||||
|                 throw Error(format("file names are not allowed to end in `%1%'") | ||||
|                     % drvExtension); | ||||
|  | @ -134,6 +143,7 @@ static void processBinding(EvalState & state, Expr e, Derivation & drv, | |||
|             drv.inputSrcs.insert(dstPath); | ||||
|             ss.push_back(dstPath); | ||||
|         } | ||||
|     } | ||||
|      | ||||
|     else if (matchList(e, es)) { | ||||
|         for (ATermIterator i(es); i; ++i) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue