builtins.path allows specifying the name of a path (which makes paths with store-illegal names now addable), allows adding paths with flat instead of recursive hashes, allows specifying a filter (so is a generalization of filterSource), and allows specifying an expected hash (enabling safe path adding in pure mode).
		
			
				
	
	
		
			7 lines
		
	
	
	
		
			195 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			7 lines
		
	
	
	
		
			195 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
| builtins.path
 | |
|   { path = ./.;
 | |
|     filter = path: _: baseNameOf path == "data";
 | |
|     recursive = true;
 | |
|     sha256 = "1yhm3gwvg5a41yylymgblsclk95fs6jy72w0wv925mmidlhcq4sw";
 | |
|     name = "output";
 | |
|   }
 |