mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-11 21:59:08 -05:00
guix package: Allow separate install of several outputs of the same package.
* guix/scripts/package.scm (guix-package)[process-actions](same-package?): New procedure. Use it instead of `alist-delete' when filtering out duplicate packages from the profile.
This commit is contained in:
parent
56fbf2629f
commit
079d127391
1 changed files with 11 additions and 2 deletions
|
@ -693,6 +693,12 @@ (define (same? d1 d2)
|
||||||
|
|
||||||
(delete-duplicates deps same?))
|
(delete-duplicates deps same?))
|
||||||
|
|
||||||
|
(define (same-package? tuple name out)
|
||||||
|
(match tuple
|
||||||
|
((tuple-name _ tuple-output _ ...)
|
||||||
|
(and (equal? name tuple-name)
|
||||||
|
(equal? out tuple-output)))))
|
||||||
|
|
||||||
(define (package->tuple p)
|
(define (package->tuple p)
|
||||||
;; Convert package P to a tuple.
|
;; Convert package P to a tuple.
|
||||||
;; When given a package via `-e', install the first of its
|
;; When given a package via `-e', install the first of its
|
||||||
|
@ -816,8 +822,11 @@ (define (show-what-to-remove/install remove install dry-run?)
|
||||||
(packages (append install*
|
(packages (append install*
|
||||||
(fold (lambda (package result)
|
(fold (lambda (package result)
|
||||||
(match package
|
(match package
|
||||||
((name _ ...)
|
((name _ out _ ...)
|
||||||
(alist-delete name result))))
|
(filter (negate
|
||||||
|
(cut same-package? <>
|
||||||
|
name out))
|
||||||
|
result))))
|
||||||
(fold alist-delete installed remove)
|
(fold alist-delete installed remove)
|
||||||
install*))))
|
install*))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue