summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLudovic Courtès <ludovic.courtes@inria.fr>2017-04-21 11:39:49 +0200
committerLudovic Courtès <ludo@gnu.org>2017-04-21 17:23:37 +0200
commit1397b422e254929de1805aaf1d0759cd5da6a60b (patch)
treeca37bb9b955a3f11b10c07905c35b078e0e3f641 /doc
parent031e6087c4c30b00f31824d269cfbf67a7c54f31 (diff)
store: 'GUIX_DAEMON_SOCKET' can now be a URI.
* guix/store.scm (%daemon-socket-file): Rename to... (%daemon-socket-uri): ... this. (connect-to-daemon): New procedure. (open-connection): Rename 'file' to 'uri'. Use 'connect-to-daemon' instead of 'open-unix-domain-socket'. * guix/tests.scm (open-connection-for-tests): Rename 'file' to 'uri'. * tests/guix-build.sh: Add tests. * tests/store.scm ("open-connection with file:// URI"): New tests.
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi26
1 files changed, 23 insertions, 3 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 753c3998e5..5f973e2fe1 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -3666,10 +3666,30 @@ accidental modifications.
@end quotation
The @code{(guix store)} module provides procedures to connect to the
-daemon, and to perform RPCs. These are described below.
+daemon, and to perform RPCs. These are described below. By default,
+@code{open-connection}, and thus all the @command{guix} commands,
+connect to the local daemon or to the URI specified by the
+@code{GUIX_DAEMON_SOCKET} environment variable.
-@deffn {Scheme Procedure} open-connection [@var{file}] [#:reserve-space? #t]
-Connect to the daemon over the Unix-domain socket at @var{file}. When
+@defvr {Environment Variable} GUIX_DAEMON_SOCKET
+When set, the value of this variable should be a file name or a URI
+designating the daemon endpoint. When it is a file name, it denotes a
+Unix-domain socket to connect to. In addition to file names, the
+supported URI schemes are:
+
+@table @code
+@item file
+@itemx unix
+These are for Unix-domain sockets.
+@code{file:///var/guix/daemon-socket/socket} is equivalent to
+@file{/var/guix/daemon-socket/socket}.
+@end table
+
+Additional URI schemes may be supported in the future.
+@end defvr
+
+@deffn {Scheme Procedure} open-connection [@var{uri}] [#:reserve-space? #t]
+Connect to the daemon over the Unix-domain socket at @var{uri} (a string). When
@var{reserve-space?} is true, instruct it to reserve a little bit of
extra space on the file system so that the garbage collector can still
operate should the disk become full. Return a server object.