summary refs log tree commit diff
path: root/nix/scripts/authenticate.in
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-11-14 18:11:58 +0100
committerLudovic Courtès <ludo@gnu.org>2018-11-14 21:34:08 +0100
commit0fe1fba4af41f267c4bb2c006fb37f42422ab703 (patch)
tree41e62d7998c5665b81664faa390507019698e468 /nix/scripts/authenticate.in
parent7a54b2281d1f60fd0ae2e058c219c5a600ad756b (diff)
downloadguix-0fe1fba4af41f267c4bb2c006fb37f42422ab703.tar.gz
daemon: Install 'authenticate' script under LIBEXECDIR/guix.
That way it is handled in the same way as other helper scripts.

* nix/scripts/guix-authenticate.in: Rename to...
* nix/scripts/authenticate.in: ... this.
* config-daemon.ac: Adjust accordingly.
* nix/local.mk (libstore_a_CPPFLAGS): Remove -DOPENSSL_PATH.
(nodist_libexec_SCRIPTS): Remove.
(nodist_pkglibexec_SCRIPTS): New variable.
* nix/nix-daemon/guix-daemon.cc (main): Remove 'setenv' call for
"PATH".
* nix/libstore/local-store.cc (runAuthenticationProgram): New function.
(LocalStore::exportPath, LocalStore::importPath): Use it instead of
'runProgram' and OPENSSL_PATH.
Diffstat (limited to 'nix/scripts/authenticate.in')
-rw-r--r--nix/scripts/authenticate.in11
1 files changed, 11 insertions, 0 deletions
diff --git a/nix/scripts/authenticate.in b/nix/scripts/authenticate.in
new file mode 100644
index 0000000000..5ce57915f0
--- /dev/null
+++ b/nix/scripts/authenticate.in
@@ -0,0 +1,11 @@
+#!@SHELL@
+# A shorthand for "guix authenticate", for use by the daemon.
+
+if test "x$GUIX_UNINSTALLED" = "x"
+then
+    prefix="@prefix@"
+    exec_prefix="@exec_prefix@"
+    exec "@bindir@/guix" authenticate "$@"
+else
+    exec guix authenticate "$@"
+fi