all the primops. This allows Nix expressions to test for new primops and take appropriate action if they're not available. For instance, rather than calling a primop `foo' directly, they could say `if builtins ? foo then builtins.foo ... else ...'.
		
			
				
	
	
		
			12 lines
		
	
	
	
		
			225 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
	
		
			225 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
assert builtins ? currentSystem;
 | 
						|
assert !builtins ? __currentSystem;
 | 
						|
 | 
						|
let {
 | 
						|
 | 
						|
  x = if builtins ? dirOf then builtins.dirOf /foo/bar else "";
 | 
						|
 | 
						|
  y = if builtins ? fnord then builtins.fnord "foo" else "";
 | 
						|
 | 
						|
  body = x + y;
 | 
						|
  
 | 
						|
}
 |