diff options
| author | Arjan Adriaanse <arjan@adriaan.se> | 2022-01-02 18:20:45 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2022-01-05 23:44:18 +0100 |
| commit | d7fb57bcd559fc1fea60cbed91990c06462d33fb (patch) | |
| tree | 55d52a522c90cebee7294d69e59b38bf871b8ba1 /tests | |
| parent | 282197b52158764889bcc56955dc98940947d493 (diff) | |
home: import: Fix handling of manifest entries with specific output.
specification->package fails on manifest entries with specific outputs,
resulting in an invalid home configuration. This changes the import command
to use specification->package+output instead.
* guix/scripts/home/import.scm (manifest+configuration-files->code): Make sure
manifest entries with specific output are also handled.
* tests/home-import.scm: Specify output in home environment manifest entry.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/home-import.scm | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/home-import.scm b/tests/home-import.scm index 0bcdf8a469a..6d373acf79f 100644 --- a/tests/home-import.scm +++ b/tests/home-import.scm | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz> | 2 | ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz> |
| 3 | ;;; Copyright © 2022 Arjan Adriaanse <arjan@adriaan.se> | ||
| 3 | ;;; | 4 | ;;; |
| 4 | ;;; This file is part of GNU Guix. | 5 | ;;; This file is part of GNU Guix. |
| 5 | ;;; | 6 | ;;; |
| @@ -52,7 +53,8 @@ | |||
| 52 | (define gcc | 53 | (define gcc |
| 53 | (manifest-entry | 54 | (manifest-entry |
| 54 | (name "gcc") | 55 | (name "gcc") |
| 55 | (version "10.3.0") | 56 | (version "") |
| 57 | (output "lib") | ||
| 56 | (item "/gnu/store/..."))) | 58 | (item "/gnu/store/..."))) |
| 57 | 59 | ||
| 58 | ;; Helpers for checking and generating home environments. | 60 | ;; Helpers for checking and generating home environments. |
| @@ -101,8 +103,8 @@ corresponding file." | |||
| 101 | ('gnu 'services)) | 103 | ('gnu 'services)) |
| 102 | ('home-environment | 104 | ('home-environment |
| 103 | ('packages | 105 | ('packages |
| 104 | ('map 'specification->package | 106 | ('map ('compose 'list 'specification->package+output) |
| 105 | ('list "guile@2.0.9" "gcc" "glibc@2.19"))) | 107 | ('list "guile@2.0.9" "gcc:lib" "glibc@2.19"))) |
| 106 | ('services | 108 | ('services |
| 107 | ('list))))) | 109 | ('list))))) |
| 108 | 110 | ||
| @@ -118,7 +120,7 @@ corresponding file." | |||
| 118 | ('home-environment | 120 | ('home-environment |
| 119 | ('packages | 121 | ('packages |
| 120 | ('list (transform ('specification->package "guile@2.0.9")) | 122 | ('list (transform ('specification->package "guile@2.0.9")) |
| 121 | ('specification->package "gcc") | 123 | ('list ('specification->package "gcc") "lib") |
| 122 | ('specification->package "glibc@2.19"))) | 124 | ('specification->package "glibc@2.19"))) |
| 123 | ('services ('list))))) | 125 | ('services ('list))))) |
| 124 | 126 | ||
| @@ -130,7 +132,7 @@ corresponding file." | |||
| 130 | ('gnu 'services)) | 132 | ('gnu 'services)) |
| 131 | ('home-environment | 133 | ('home-environment |
| 132 | ('packages | 134 | ('packages |
| 133 | ('map 'specification->package | 135 | ('map ('compose 'list 'specification->package+output) |
| 134 | ('list))) | 136 | ('list))) |
| 135 | ('services | 137 | ('services |
| 136 | ('list))))) | 138 | ('list))))) |
| @@ -145,7 +147,7 @@ corresponding file." | |||
| 145 | ('gnu 'home 'services 'shells)) | 147 | ('gnu 'home 'services 'shells)) |
| 146 | ('home-environment | 148 | ('home-environment |
| 147 | ('packages | 149 | ('packages |
| 148 | ('map 'specification->package | 150 | ('map ('compose 'list 'specification->package+output) |
| 149 | ('list))) | 151 | ('list))) |
| 150 | ('services | 152 | ('services |
| 151 | ('list ('service | 153 | ('list ('service |
