Don't run pre-build-hook if we don't have a derivation
This fixes a build failure on OS X when using Hydra or Nix 1.12's build-remote (since they don't copy the derivation to the build machine).
This commit is contained in:
		
							parent
							
								
									186571965d
								
							
						
					
					
						commit
						7f5b750b40
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -1950,7 +1950,7 @@ void DerivationGoal::startBuilder()
 | 
			
		|||
                }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (settings.preBuildHook != "") {
 | 
			
		||||
    if (useChroot && settings.preBuildHook != "" && dynamic_cast<Derivation *>(drv.get())) {
 | 
			
		||||
        printMsg(lvlChatty, format("executing pre-build hook ‘%1%’")
 | 
			
		||||
            % settings.preBuildHook);
 | 
			
		||||
        auto args = useChroot ? Strings({drvPath, chrootRootDir}) :
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue