From c89985d91d2b44704fbcaebd7a097dee0c0e3e4a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 23 Jun 2019 11:46:17 +0200 Subject: 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'. --- guix/derivations.scm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'guix') diff --git a/guix/derivations.scm b/guix/derivations.scm index 8145d51143..4df7b06181 100644 --- a/guix/derivations.scm +++ b/guix/derivations.scm @@ -157,6 +157,14 @@ "Return the object INPUT refers to." (read-derivation-from-file (derivation-input-path input))) +(define* (derivation-input drv #:optional + (outputs (derivation-output-names drv))) + "Return a 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! (lambda (drv port) (format port "# ~a ~a>" -- cgit v1.2.3