mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
packages: 'package-direct-sources' correctly handles non-origin sources.
Previously 'package-direct-sources' would trigger a wrong-type-arg error when passed a package whose 'source' is not an origin, such as 'ruby-sorbet-runtime'. * guix/packages.scm (package-direct-sources): Call 'expand' if and only if (package-source package) is an origin.
This commit is contained in:
parent
61a6b05850
commit
1df54ceab3
1 changed files with 7 additions and 4 deletions
|
@ -1234,11 +1234,14 @@ (define (package-direct-sources package)
|
|||
"Return all source origins associated with PACKAGE; including origins in
|
||||
PACKAGE's inputs and patches."
|
||||
(define (expand source)
|
||||
(cons
|
||||
source
|
||||
(filter origin? (origin-patches source))))
|
||||
(cons source
|
||||
(filter origin? (origin-patches source))))
|
||||
|
||||
`(,@(or (and=> (package-source package) expand) '())
|
||||
`(,@(match (package-source package)
|
||||
((? origin? origin)
|
||||
(expand origin))
|
||||
(_
|
||||
'()))
|
||||
,@(filter-map (match-lambda
|
||||
((_ (? origin? orig) _ ...)
|
||||
orig)
|
||||
|
|
Loading…
Reference in a new issue