From f9aefa2d5fb3f6aad25a907939ee872c828b33d0 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 13 Nov 2016 22:59:54 +0100 Subject: daemon: Add 'built-in-builders' RPC. * nix/libstore/builtins.cc (builtinBuilderNames): New function. * nix/libstore/builtins.hh (builtinBuilderNames): New declaration. * nix/libstore/worker-protocol.hh (PROTOCOL_VERSION): Bump to 0x160. (WorkerOp)[wopBuiltinBuilders]: New value. * nix/nix-daemon/nix-daemon.cc (performOp): Handle it. * guix/store.scm (operation-id)[built-in-builders]: New value. * guix/store.scm (read-arg): Add 'string-list'. (built-in-builders): New procedure. * tests/derivations.scm ("built-in-builders"): New test. --- nix/nix-daemon/nix-daemon.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'nix/nix-daemon') diff --git a/nix/nix-daemon/nix-daemon.cc b/nix/nix-daemon/nix-daemon.cc index 35c284f7e1..9b29b3e91d 100644 --- a/nix/nix-daemon/nix-daemon.cc +++ b/nix/nix-daemon/nix-daemon.cc @@ -6,6 +6,7 @@ #include "archive.hh" #include "affinity.hh" #include "globals.hh" +#include "builtins.hh" #include @@ -671,6 +672,14 @@ static void performOp(bool trusted, unsigned int clientVersion, break; } + case wopBuiltinBuilders: { + startWork(); + auto names = builtinBuilderNames(); + stopWork(); + writeStrings(names, to); + break; + } + default: throw Error(format("invalid operation %1%") % op); } -- cgit v1.2.3