summaryrefslogtreecommitdiff
path: root/nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix')
-rw-r--r--nix/nix-daemon/guix-daemon.cc6
-rw-r--r--nix/scripts/guix-authenticate.in11
2 files changed, 17 insertions, 0 deletions
diff --git a/nix/nix-daemon/guix-daemon.cc b/nix/nix-daemon/guix-daemon.cc
index 484a390936..cf87e39354 100644
--- a/nix/nix-daemon/guix-daemon.cc
+++ b/nix/nix-daemon/guix-daemon.cc
@@ -216,6 +216,12 @@ main (int argc, char *argv[])
{
settings.processEnvironment ();
+ /* Hackily help 'local-store.cc' find our 'guix-authenticate' program, which
+ is known as 'OPENSSL_PATH' here. */
+ std::string search_path (getenv ("PATH"));
+ search_path = settings.nixLibexecDir + ":" + search_path;
+ setenv ("PATH", search_path.c_str (), 1);
+
/* Use our substituter by default. */
settings.substituters.clear ();
settings.useSubstitutes = true;
diff --git a/nix/scripts/guix-authenticate.in b/nix/scripts/guix-authenticate.in
new file mode 100644
index 0000000000..5ce57915f0
--- /dev/null
+++ b/nix/scripts/guix-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