mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
guix package: Use absolute file names in search path recommendations.
Suggested by Chris Marusich. * guix/scripts/package.scm (absolutize): New procedure. (display-search-paths): Use it.
This commit is contained in:
parent
6b11da7db2
commit
21b3c0ca87
1 changed files with 9 additions and 1 deletions
|
@ -278,11 +278,19 @@ (define* (search-path-environment-variables entries profiles
|
|||
(evaluate-search-paths search-paths profiles
|
||||
getenv))))
|
||||
|
||||
(define (absolutize file)
|
||||
"Return an absolute file name equivalent to FILE, but without resolving
|
||||
symlinks like 'canonicalize-path' would do."
|
||||
(if (string-prefix? "/" file)
|
||||
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 user-friendly-profile profiles))
|
||||
(let* ((profiles (map (compose user-friendly-profile absolutize)
|
||||
profiles))
|
||||
(settings (search-path-environment-variables entries profiles
|
||||
#:kind kind)))
|
||||
(unless (null? settings)
|
||||
|
|
Loading…
Reference in a new issue