* Start of `nix-store --export' operation for serialising a store
path. This is like `nix-store --dump', only it also dumps the meta-information of the store path (references, deriver). Will add a `--sign' flag later to add a cryptographic signature, which we will use for exchanging store paths between build farm machines in a secure manner.
This commit is contained in:
		
							parent
							
								
									3390c1be76
								
							
						
					
					
						commit
						b824a1daee
					
				
					 6 changed files with 50 additions and 0 deletions
				
			
		|  | @ -638,6 +638,15 @@ static void opRestore(Strings opFlags, Strings opArgs) | |||
| } | ||||
| 
 | ||||
| 
 | ||||
| static void opExport(Strings opFlags, Strings opArgs) | ||||
| { | ||||
|     if (!opFlags.empty()) throw UsageError("unknown flag"); | ||||
| 
 | ||||
|     FdSink sink(STDOUT_FILENO); | ||||
|     store->exportPath(*opArgs.begin(), false, sink); | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| /* Initialise the Nix databases. */ | ||||
| static void opInit(Strings opFlags, Strings opArgs) | ||||
| { | ||||
|  | @ -707,6 +716,8 @@ void run(Strings args) | |||
|             op = opDump; | ||||
|         else if (arg == "--restore") | ||||
|             op = opRestore; | ||||
|         else if (arg == "--export") | ||||
|             op = opExport; | ||||
|         else if (arg == "--init") | ||||
|             op = opInit; | ||||
|         else if (arg == "--verify") | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue