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

nix-store --serve: Use dump instead of export

Also remove signing support

Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
Shea Levy 2014-02-07 16:17:52 -05:00
parent 188f96500b
commit 73874629ef
3 changed files with 7 additions and 12 deletions

View file

@ -837,18 +837,12 @@ static void opClearFailedPaths(Strings opFlags, Strings opArgs)
// Serve the nix store in a way usable by a restricted ssh user
static void opServe(Strings opFlags, Strings opArgs)
{
if (!opArgs.empty())
throw UsageError("no arguments expected");
// Could eventually take a username argument?
bool sign;
foreach (Strings::iterator, i, opFlags)
if (*i == "--sign") sign = true;
else throw UsageError(format("unknown flag `%1%'") % *i);
if (!opArgs.empty() || !opFlags.empty())
throw UsageError("no arguments or flags expected");
FdSource in(STDIN_FILENO);
FdSink out(STDOUT_FILENO);
store->serve(in, out, sign);
store->serve(in, out);
}