1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 21:41:48 +02:00

* 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:
Eelco Dolstra 2007-02-20 23:17:20 +00:00
parent 3390c1be76
commit b824a1daee
6 changed files with 50 additions and 0 deletions

View file

@ -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")