mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
services: profile: Create manifest at monadic-bind time.
Fixes <https://bugs.gnu.org/44952>. Reported by Mathieu Othacehe <othacehe@gnu.org>. * gnu/services.scm (packages->profile-entry): Change 'with-monad' to 'mlet' with one binding.
This commit is contained in:
parent
56fc14577e
commit
07a33b1d21
1 changed files with 7 additions and 1 deletions
|
@ -788,7 +788,13 @@ (define setuid-program-service-type
|
|||
|
||||
(define (packages->profile-entry packages)
|
||||
"Return a system entry for the profile containing PACKAGES."
|
||||
(with-monad %store-monad
|
||||
;; XXX: 'mlet' is needed here for one reason: to get the proper
|
||||
;; '%current-target' and '%current-target-system' bindings when
|
||||
;; 'packages->manifest' is called, and thus when the 'package-inputs'
|
||||
;; etc. procedures are called on PACKAGES. That way, conditionals in those
|
||||
;; inputs see the "correct" value of these two parameters. See
|
||||
;; <https://issues.guix.gnu.org/44952>.
|
||||
(mlet %store-monad ((_ (current-target-system)))
|
||||
(return `(("profile" ,(profile
|
||||
(content (packages->manifest
|
||||
(delete-duplicates packages eq?)))))))))
|
||||
|
|
Loading…
Reference in a new issue