diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2018-10-20 17:51:58 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2018-11-05 00:08:46 +0100 |
| commit | ab3c60ace3bdd376255463c6475b62f6d17e5978 (patch) | |
| tree | 5e9ada35b0062f7462b9050c2168e3980f122bff /gnu | |
| parent | 97b7b96efc2a65f2805567191237451b34e4d966 (diff) | |
install: Parameterize the profile name for 'populate-single-profile-directory'.
* gnu/build/install.scm (populate-single-profile-directory): Add
#:profile-name. Replace hard-coded occurrences of "guix-profile" with
PROFILE-NAME. Make the symlink part under /root a function of
PROFILE-NAME.
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/build/install.scm | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/gnu/build/install.scm b/gnu/build/install.scm index c602d69489b..98c547f2e4d 100644 --- a/gnu/build/install.scm +++ b/gnu/build/install.scm | |||
| @@ -160,6 +160,7 @@ deduplicates files common to CLOSURE and the rest of PREFIX." | |||
| 160 | 160 | ||
| 161 | (define* (populate-single-profile-directory directory | 161 | (define* (populate-single-profile-directory directory |
| 162 | #:key profile closure | 162 | #:key profile closure |
| 163 | (profile-name "guix-profile") | ||
| 163 | deduplicate? | 164 | deduplicate? |
| 164 | register? schema) | 165 | register? schema) |
| 165 | "Populate DIRECTORY with a store containing PROFILE, whose closure is given | 166 | "Populate DIRECTORY with a store containing PROFILE, whose closure is given |
| @@ -169,6 +170,9 @@ When REGISTER? is true, initialize DIRECTORY/var/guix/db to reflect the | |||
| 169 | contents of the store; DEDUPLICATE? determines whether to deduplicate files in | 170 | contents of the store; DEDUPLICATE? determines whether to deduplicate files in |
| 170 | the store. | 171 | the store. |
| 171 | 172 | ||
| 173 | PROFILE-NAME is the name of the profile being created under | ||
| 174 | /var/guix/profiles, typically either \"guix-profile\" or \"current-guix\". | ||
| 175 | |||
| 172 | This is used to create the self-contained tarballs with 'guix pack'." | 176 | This is used to create the self-contained tarballs with 'guix pack'." |
| 173 | (define (scope file) | 177 | (define (scope file) |
| 174 | (string-append directory "/" file)) | 178 | (string-append directory "/" file)) |
| @@ -198,12 +202,20 @@ This is used to create the self-contained tarballs with 'guix pack'." | |||
| 198 | ;; Make root's profile, which makes it a GC root. | 202 | ;; Make root's profile, which makes it a GC root. |
| 199 | (mkdir-p* %root-profile) | 203 | (mkdir-p* %root-profile) |
| 200 | (symlink* profile | 204 | (symlink* profile |
| 201 | (string-append %root-profile "/guix-profile-1-link")) | 205 | (string-append %root-profile "/" profile-name "-1-link")) |
| 202 | (symlink* "guix-profile-1-link" | 206 | (symlink* (string-append profile-name "-1-link") |
| 203 | (string-append %root-profile "/guix-profile")) | 207 | (string-append %root-profile "/" profile-name)) |
| 204 | 208 | ||
| 205 | (mkdir-p* "/root") | 209 | (match profile-name |
| 206 | (symlink* (string-append %root-profile "/guix-profile") | 210 | ("guix-profile" |
| 207 | "/root/.guix-profile")) | 211 | (mkdir-p* "/root") |
| 212 | (symlink* (string-append %root-profile "/guix-profile") | ||
| 213 | "/root/.guix-profile")) | ||
| 214 | ("current-guix" | ||
| 215 | (mkdir-p* "/root/.config/guix") | ||
| 216 | (symlink* (string-append %root-profile "/current-guix") | ||
| 217 | "/root/.config/guix/current")) | ||
| 218 | (_ | ||
| 219 | #t))) | ||
| 208 | 220 | ||
| 209 | ;;; install.scm ends here | 221 | ;;; install.scm ends here |
