feat(3p/nix): Add OptimiseStore
Change-Id: I0d254504801283e018eef41bd5ea9850b17c0d80 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1205 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
parent
b6cb681c0b
commit
3999439fbb
2 changed files with 6 additions and 1 deletions
3
third_party/nix/src/nix-daemon/nix-daemon.cc
vendored
3
third_party/nix/src/nix-daemon/nix-daemon.cc
vendored
|
@ -630,12 +630,13 @@ static void performOp(TunnelLogger* logger, const ref<Store>& store,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case wopOptimiseStore:
|
case wopOptimiseStore: {
|
||||||
logger->startWork();
|
logger->startWork();
|
||||||
store->optimiseStore();
|
store->optimiseStore();
|
||||||
logger->stopWork();
|
logger->stopWork();
|
||||||
to << 1;
|
to << 1;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case wopVerifyStore: {
|
case wopVerifyStore: {
|
||||||
bool checkContents;
|
bool checkContents;
|
||||||
|
|
4
third_party/nix/src/proto/worker.proto
vendored
4
third_party/nix/src/proto/worker.proto
vendored
|
@ -78,6 +78,10 @@ service Worker {
|
||||||
// Return all currently valid derivations that have the given store path as an
|
// Return all currently valid derivations that have the given store path as an
|
||||||
// output.
|
// output.
|
||||||
rpc QueryValidDerivers(StorePath) returns (StorePaths);
|
rpc QueryValidDerivers(StorePath) returns (StorePaths);
|
||||||
|
|
||||||
|
// Optimise the disk space usage of the Nix store by hard-linking files
|
||||||
|
// with the same contents.
|
||||||
|
rpc OptimiseStore(google.protobuf.Empty) returns (google.protobuf.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
enum HashType {
|
enum HashType {
|
||||||
|
|
Loading…
Reference in a new issue