From: "Ludovic Courtès" <ludo@gnu.org>
To: 32104@debbugs.gnu.org
Subject: [bug#32104] [PATCH 1/3] profiles: Factorize 'manifest-search-paths'.
Date: Mon, 9 Jul 2018 13:39:52 +0200 [thread overview]
Message-ID: <20180709113954.15272-1-ludo@gnu.org> (raw)
In-Reply-To: <20180709113147.15020-1-ludo@gnu.org>
* guix/profiles.scm (manifest-search-paths): New procedure.
(profile-derivation)[builder]: Use it.
* guix/build/profiles.scm (build-etc/profile): Remove $PATH.
---
guix/build/profiles.scm | 2 +-
guix/profiles.scm | 12 ++++++++++--
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/guix/build/profiles.scm b/guix/build/profiles.scm
index 819688a91..df785c85a 100644
--- a/guix/build/profiles.scm
+++ b/guix/build/profiles.scm
@@ -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))))))
diff --git a/guix/profiles.scm b/guix/profiles.scm
index e6b77e8d3..88228f155 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -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)))))
+
\f
;;;
;;; 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?
--
2.18.0
next prev parent reply other threads:[~2018-07-09 11:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-09 11:31 [bug#32104] [PATCH 0/3] guix environment: Simplify environment creation Ludovic Courtès
2018-07-09 11:39 ` Ludovic Courtès [this message]
2018-07-09 11:39 ` [bug#32104] [PATCH 2/3] environment: Simplify code by using manifests internally Ludovic Courtès
2018-07-09 11:39 ` [bug#32104] [PATCH 3/3] profiles: Introduce 'profile-search-paths' and use it Ludovic Courtès
2018-07-09 13:22 ` [bug#32104] [PATCH 0/3] guix environment: Simplify environment creation Thompson, David
2018-07-10 23:02 ` bug#32104: " Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180709113954.15272-1-ludo@gnu.org \
--to=ludo@gnu.org \
--cc=32104@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).