diff options
author | Antero Mejr <[email protected]> | 2022-05-27 13:13:28 -0400 |
---|---|---|
committer | Ludovic Courtès <[email protected]> | 2022-06-06 22:43:30 +0200 |
commit | 7041fe0646a9603e7d1d6bde139a284146515917 (patch) | |
tree | 291d34978be6434bd52681518a967ee3cd976097 /gnu/packages.scm | |
parent | f08bfca0836ea515ea8ddcfb72d319fd6838908a (diff) |
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 <[email protected]>
Diffstat (limited to 'gnu/packages.scm')
-rw-r--r-- | gnu/packages.scm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gnu/packages.scm b/gnu/packages.scm index 2ba838fd0a..ab722d00d8 100644 --- a/gnu/packages.scm +++ b/gnu/packages.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2014 Eric Bavier <[email protected]> ;;; Copyright © 2016, 2017 Alex Kost <[email protected]> ;;; Copyright © 2016 Mathieu Lirzin <[email protected]> +;;; Copyright © 2022 Antero Mejr <[email protected]> ;;; ;;; This file is part of GNU Guix. ;;; @@ -65,6 +66,7 @@ specification->package+output specification->location specifications->manifest + specifications->packages package-unique-version-prefix @@ -554,13 +556,20 @@ output." (package-full-name package) sub-drv)))))) +(define (specifications->packages specs) + "Given SPECS, a list of specifications such as \"[email protected]\" or +\"guile:debug\", return a list of package/output tuples." + ;; This procedure exists so users of 'guix home' don't have to write out the + ;; (map (compose list specification->package+output)... boilerplate. + (map (compose list specification->package+output) specs)) + (define (specifications->manifest specs) "Given SPECS, a list of specifications such as \"[email protected]\" or \"guile:debug\", return a profile manifest." ;; This procedure exists mostly so users of 'guix package -m' don't have to ;; fiddle with multiple-value returns. (packages->manifest - (map (compose list specification->package+output) specs))) + (specifications->packages specs))) (define (package-unique-version-prefix name version) "Search among all the versions of package NAME that are available, and |