aboutsummaryrefslogtreecommitdiff
path: root/nix/libstore
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2023-11-10 21:37:28 +0100
committerLudovic Courtès <ludo@gnu.org>2023-12-11 23:18:53 +0100
commit1e47148f46e31eb99ce8ec7bc12232cf50d0ebec (patch)
treea2693022e88bc939e32b47671f8464d3ec3d4df0 /nix/libstore
parentb650dcabf1cd1aa596228e1e7eff4acf372ef6a6 (diff)
downloadguix-1e47148f46e31eb99ce8ec7bc12232cf50d0ebec.tar.gz
guix-1e47148f46e31eb99ce8ec7bc12232cf50d0ebec.zip
daemon: Implement ‘substitute-urls’ RPC.
* nix/libstore/worker-protocol.hh (PROTOCOL_VERSION): Bump. (WorkerOp): Add ‘wopSubstituteURLs’. * nix/nix-daemon/nix-daemon.cc (performOp): Implement it. * guix/store.scm (%protocol-version): Bump. (operation-id): Add ‘substitute-urls’. (substitute-urls): New procedure. * tests/store.scm ("substitute-urls, default") ("substitute-urls, client-specified URLs") ("substitute-urls, disabled"): New tests. Change-Id: I2c0119500c3a1eecfa5ebf32463ffb0f173161de
Diffstat (limited to 'nix/libstore')
-rw-r--r--nix/libstore/worker-protocol.hh5
1 files changed, 3 insertions, 2 deletions
diff --git a/nix/libstore/worker-protocol.hh b/nix/libstore/worker-protocol.hh
index ea67b10a5b..ef259db2a0 100644
--- a/nix/libstore/worker-protocol.hh
+++ b/nix/libstore/worker-protocol.hh
@@ -6,7 +6,7 @@ namespace nix {
#define WORKER_MAGIC_1 0x6e697863
#define WORKER_MAGIC_2 0x6478696f
-#define PROTOCOL_VERSION 0x163
+#define PROTOCOL_VERSION 0x164
#define GET_PROTOCOL_MAJOR(x) ((x) & 0xff00)
#define GET_PROTOCOL_MINOR(x) ((x) & 0x00ff)
@@ -44,7 +44,8 @@ typedef enum {
wopQueryValidDerivers = 33,
wopOptimiseStore = 34,
wopVerifyStore = 35,
- wopBuiltinBuilders = 80
+ wopBuiltinBuilders = 80,
+ wopSubstituteURLs = 81
} WorkerOp;