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.
This commit is contained in:
parent
97b7b96efc
commit
ab3c60ace3
|
@ -160,6 +160,7 @@ deduplicates files common to CLOSURE and the rest of PREFIX."
|
||||||
|
|
||||||
(define* (populate-single-profile-directory directory
|
(define* (populate-single-profile-directory directory
|
||||||
#:key profile closure
|
#:key profile closure
|
||||||
|
(profile-name "guix-profile")
|
||||||
deduplicate?
|
deduplicate?
|
||||||
register? schema)
|
register? schema)
|
||||||
"Populate DIRECTORY with a store containing PROFILE, whose closure is given
|
"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
|
||||||
contents of the store; DEDUPLICATE? determines whether to deduplicate files in
|
contents of the store; DEDUPLICATE? determines whether to deduplicate files in
|
||||||
the store.
|
the store.
|
||||||
|
|
||||||
|
PROFILE-NAME is the name of the profile being created under
|
||||||
|
/var/guix/profiles, typically either \"guix-profile\" or \"current-guix\".
|
||||||
|
|
||||||
This is used to create the self-contained tarballs with 'guix pack'."
|
This is used to create the self-contained tarballs with 'guix pack'."
|
||||||
(define (scope file)
|
(define (scope file)
|
||||||
(string-append directory "/" file))
|
(string-append directory "/" file))
|
||||||
|
@ -198,12 +202,20 @@ This is used to create the self-contained tarballs with 'guix pack'."
|
||||||
;; Make root's profile, which makes it a GC root.
|
;; Make root's profile, which makes it a GC root.
|
||||||
(mkdir-p* %root-profile)
|
(mkdir-p* %root-profile)
|
||||||
(symlink* profile
|
(symlink* profile
|
||||||
(string-append %root-profile "/guix-profile-1-link"))
|
(string-append %root-profile "/" profile-name "-1-link"))
|
||||||
(symlink* "guix-profile-1-link"
|
(symlink* (string-append profile-name "-1-link")
|
||||||
(string-append %root-profile "/guix-profile"))
|
(string-append %root-profile "/" profile-name))
|
||||||
|
|
||||||
|
(match profile-name
|
||||||
|
("guix-profile"
|
||||||
(mkdir-p* "/root")
|
(mkdir-p* "/root")
|
||||||
(symlink* (string-append %root-profile "/guix-profile")
|
(symlink* (string-append %root-profile "/guix-profile")
|
||||||
"/root/.guix-profile"))
|
"/root/.guix-profile"))
|
||||||
|
("current-guix"
|
||||||
|
(mkdir-p* "/root/.config/guix")
|
||||||
|
(symlink* (string-append %root-profile "/current-guix")
|
||||||
|
"/root/.config/guix/current"))
|
||||||
|
(_
|
||||||
|
#t)))
|
||||||
|
|
||||||
;;; install.scm ends here
|
;;; install.scm ends here
|
||||||
|
|
Loading…
Reference in New Issue