summary refs log tree commit diff
path: root/gnu/packages/package-management.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/package-management.scm')
-rw-r--r--gnu/packages/package-management.scm17
1 files changed, 16 insertions, 1 deletions
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 33dce5c809..7f6ec56151 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -99,7 +99,22 @@
                      (copy "x86_64")
                      (copy "mips64el")
                      (copy "armhf")
-                     #t)))))
+                     #t))
+                  (add-after
+                   'install 'wrap-program
+                   (lambda* (#:key inputs outputs #:allow-other-keys)
+                     ;; Make sure the 'guix' command finds GnuTLS and
+                     ;; Guile-JSON automatically.
+                     (let* ((out    (assoc-ref outputs "out"))
+                            (json   (assoc-ref inputs "guile-json"))
+                            (gnutls (assoc-ref inputs "gnutls"))
+                            (path   (string-append
+                                     json "/share/guile/site/2.0:"
+                                     gnutls "/share/guile/site/2.0")))
+                       (wrap-program (string-append out "/bin/guix")
+                         `("GUILE_LOAD_PATH" ":" prefix (,path))
+                         `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,path)))
+                       #t))))))
     (native-inputs `(("pkg-config" ,pkg-config)
                      ("emacs" ,emacs-no-x)))      ;for guix.el
     (inputs