packages: Add 'specifications->packages'.

* gnu/packages.scm (specifications->packages): New procedure.
* guix/scripts/home/import.scm (manifest+configuration-files->code): Use it.
* tests/home-import.scm (match-home-environment-no-services)
(match-home-environment-no-services-nor-packages)
(match-home-environment-bash-service)
(match-home-environment-bash-service-with-alias): Adjust 'packages'
field accordingly.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Antero Mejr 2022-05-27 13:13:28 -04:00 committed by Ludovic Courtès
parent f08bfca083
commit 7041fe0646
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
3 changed files with 17 additions and 11 deletions

View file

@ -3,6 +3,7 @@
;;; Copyright © 2021 Andrew Tropin <andrew@trop.in>
;;; Copyright © 2021-2022 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2022 Arjan Adriaanse <arjan@adriaan.se>
;;; Copyright © 2022 Antero Mejr <antero@mailbox.org>
;;;
;;; This file is part of GNU Guix.
;;;
@ -170,8 +171,7 @@ user's files to CONFIGURATION-DIRECTORY; the generated sexp refers to them."
,@(delete-duplicates (concatenate modules)))
(home-environment
(packages (map (compose list specification->package+output)
,packages))
(packages (specifications->packages ,packages))
(services (list ,@services)))))))))
(define* (import-manifest