me
/
guix
Archived
1
0
Fork 0

profiles: Factorize 'manifest-search-paths'.

* guix/profiles.scm (manifest-search-paths): New procedure.
(profile-derivation)[builder]: Use it.
* guix/build/profiles.scm (build-etc/profile): Remove $PATH.
master
Ludovic Courtès 2018-07-09 10:44:36 +02:00
parent 1dec269176
commit f03df3ee75
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
2 changed files with 11 additions and 3 deletions

View File

@ -89,7 +89,7 @@ definitions for all the SEARCH-PATHS."
# When GUIX_PROFILE is undefined, the various environment variables refer
# to this specific profile generation.
\n" port)
(let ((variables (evaluate-search-paths (cons $PATH search-paths)
(let ((variables (evaluate-search-paths search-paths
(list output))))
(for-each (write-environment-variable-definition port)
(map (abstract-profile output) variables))))))

View File

@ -91,6 +91,7 @@
manifest-lookup
manifest-installed?
manifest-matching-entries
manifest-search-paths
manifest-transaction
manifest-transaction?
@ -545,6 +546,14 @@ no match.."
(filter matches? (manifest-entries manifest)))
(define (manifest-search-paths manifest)
"Return the list of search path specifications that apply to MANIFEST,
including the search path specification for $PATH."
(delete-duplicates
(cons $PATH
(append-map manifest-entry-search-paths
(manifest-entries manifest)))))
;;;
;;; Manifest transactions.
@ -1367,8 +1376,7 @@ are cross-built for TARGET."
(map sexp->search-path-specification
(delete-duplicates
'#$(map search-path-specification->sexp
(append-map manifest-entry-search-paths
(manifest-entries manifest))))))
(manifest-search-paths manifest)))))
(build-profile #$output '#$inputs
#:symlink #$(if relative-symlinks?