summaryrefslogtreecommitdiff
path: root/guix/scripts/package.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-06-09 00:57:36 +0200
committerMarius Bakke <mbakke@fastmail.com>2019-06-09 00:57:36 +0200
commit69ecd666d73ebc5ee7a0be54f4e24f000d1d7e31 (patch)
tree80fc467b3129cd302aed02622dd497247a8c5bb0 /guix/scripts/package.scm
parent4bed3b101253e5f82c6423f0eb55b307ec839f53 (diff)
parentc6de5afe5c5da34513ea43b041fead30f28f57d4 (diff)
Merge branch 'master' into staging
Diffstat (limited to 'guix/scripts/package.scm')
-rw-r--r--guix/scripts/package.scm30
1 files changed, 17 insertions, 13 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 06e4cf5b9c..5751123525 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -57,7 +57,6 @@
#:export (build-and-use-profile
delete-generations
delete-matching-generations
- display-search-paths
guix-package
(%options . %package-options)
@@ -169,8 +168,7 @@ hooks\" run when building the profile."
"~a packages in profile~%"
count)
count)
- (display-search-paths entries (list profile)
- #:kind 'prefix)))
+ (display-search-path-hint entries profile)))
(warn-about-disk-space profile))))))
@@ -289,17 +287,23 @@ symlinks like 'canonicalize-path' would do."
file
(string-append (getcwd) "/" file)))
-(define* (display-search-paths entries profiles
- #:key (kind 'exact))
- "Display the search path environment variables that may need to be set for
-ENTRIES, a list of manifest entries, in the context of PROFILE."
- (let* ((profiles (map (compose user-friendly-profile absolutize)
- profiles))
- (settings (search-path-environment-variables entries profiles
- #:kind kind)))
+(define (display-search-path-hint entries profile)
+ "Display a hint on how to set environment variables to use ENTRIES, a list
+of manifest entries, in the context of PROFILE."
+ (let* ((profile (user-friendly-profile (absolutize profile)))
+ (settings (search-path-environment-variables entries (list profile)
+ #:kind 'prefix)))
(unless (null? settings)
- (format #t (G_ "The following environment variable definitions may be needed:~%"))
- (format #t "~{ ~a~%~}" settings))))
+ (display-hint (format #f (G_ "Consider setting the necessary environment
+variables by running:
+
+@example
+GUIX_PROFILE=\"~a\"
+. \"$GUIX_PROFILE/etc/profile\"
+@end example
+
+Alternately, see @command{guix package --search-paths -p ~s}.")
+ profile profile)))))
;;;