mirror of
https://codeberg.org/guix/guix.git
synced 2026-01-25 12:05:19 -06:00
ci: Backport package-channels procedure.
* gnu/ci.scm (package-channels): New procedure.
This commit is contained in:
parent
7546a1d3c0
commit
c13ad2b889
1 changed files with 21 additions and 0 deletions
21
gnu/ci.scm
21
gnu/ci.scm
|
|
@ -109,6 +109,27 @@ does not have the expected structure."
|
|||
|
||||
(_ #f)))
|
||||
|
||||
;; Backport from (guix describe) module.
|
||||
(define (package-channels package)
|
||||
"Return the list of channels providing PACKAGE or an empty list if it could
|
||||
not be determined."
|
||||
(match (and=> (package-location package) location-file)
|
||||
(#f '())
|
||||
(file
|
||||
(let ((file (if (string-prefix? "/" file)
|
||||
file
|
||||
(search-path %load-path file))))
|
||||
(if (and file
|
||||
(string-prefix? (%store-prefix) file))
|
||||
(filter-map
|
||||
(lambda (entry)
|
||||
(let ((item (manifest-entry-item entry)))
|
||||
(and (or (string-prefix? item file)
|
||||
(string=? "guix" (manifest-entry-name entry)))
|
||||
(manifest-entry-channel entry))))
|
||||
(current-profile-entries))
|
||||
'())))))
|
||||
|
||||
(define* (derivation->job name drv
|
||||
#:key
|
||||
(max-silent-time 3600)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue