mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
derivations: Add 'derivation-input'.
* guix/derivations.scm (derivation-input): New procedure. * tests/grafts.scm (make-derivation-input): Remove. ("graft-derivation, unused outputs not depended on"): Use 'derivation-input'.
This commit is contained in:
parent
4311cf965c
commit
c89985d91d
2 changed files with 12 additions and 12 deletions
|
@ -157,6 +157,14 @@
|
|||
"Return the <derivation> object INPUT refers to."
|
||||
(read-derivation-from-file (derivation-input-path input)))
|
||||
|
||||
(define* (derivation-input drv #:optional
|
||||
(outputs (derivation-output-names drv)))
|
||||
"Return a <derivation-input> for the OUTPUTS of DRV."
|
||||
;; This is a public interface meant to be more convenient than
|
||||
;; 'make-derivation-input' and giving us more control.
|
||||
(make-derivation-input (derivation-file-name drv)
|
||||
outputs))
|
||||
|
||||
(set-record-type-printer! <derivation>
|
||||
(lambda (drv port)
|
||||
(format port "#<derivation ~a => ~a ~a>"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue