mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-14 02:06:16 +02:00
Add narFromPath op to nix daemon
This commit is contained in:
parent
a705e8ce0a
commit
b4b5e9ce2f
2 changed files with 9 additions and 0 deletions
|
@ -46,6 +46,7 @@ typedef enum {
|
||||||
wopVerifyStore = 35,
|
wopVerifyStore = 35,
|
||||||
wopBuildDerivation = 36,
|
wopBuildDerivation = 36,
|
||||||
wopAddSignatures = 37,
|
wopAddSignatures = 37,
|
||||||
|
wopNarFromPath = 38
|
||||||
} WorkerOp;
|
} WorkerOp;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -576,6 +576,14 @@ static void performOp(ref<LocalStore> store, bool trusted, unsigned int clientVe
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case wopNarFromPath: {
|
||||||
|
auto path = readStorePath(*store, from);
|
||||||
|
startWork();
|
||||||
|
dumpPath(path, to);
|
||||||
|
stopWork();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw Error(format("invalid operation %1%") % op);
|
throw Error(format("invalid operation %1%") % op);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue