1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 09:11:47 +02:00

* nix-store --import': import an archive created by nix-store

--export' into the Nix store, and optionally check the cryptographic
  signatures against /nix/etc/nix/signing-key.pub.  (TODO: verify
  against a set of public keys.)
This commit is contained in:
Eelco Dolstra 2007-02-21 15:45:32 +00:00
parent 46e0919ced
commit 43c4d18c6a
8 changed files with 142 additions and 10 deletions

View file

@ -651,6 +651,16 @@ static void opExport(Strings opFlags, Strings opArgs)
}
static void opImport(Strings opFlags, Strings opArgs)
{
if (!opFlags.empty()) throw UsageError("unknown flag");
if (!opArgs.empty()) throw UsageError("no arguments expected");
FdSource source(STDIN_FILENO);
cout << format("%1%\n") % store->importPath(false, source);
}
/* Initialise the Nix databases. */
static void opInit(Strings opFlags, Strings opArgs)
{
@ -722,6 +732,8 @@ void run(Strings args)
op = opRestore;
else if (arg == "--export")
op = opExport;
else if (arg == "--import")
op = opImport;
else if (arg == "--init")
op = opInit;
else if (arg == "--verify")