1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
5 ;;; This file is part of GNU Guix.
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20 (define-module (guix packages)
21 #:use-module (guix utils)
22 #:use-module (guix records)
23 #:use-module (guix store)
24 #:use-module (guix base32)
25 #:use-module (guix derivations)
26 #:use-module (guix build-system)
27 #:use-module (ice-9 match)
28 #:use-module (ice-9 vlist)
29 #:use-module (srfi srfi-1)
30 #:use-module (srfi srfi-9 gnu)
31 #:use-module (srfi srfi-11)
32 #:use-module (srfi srfi-26)
33 #:use-module (srfi srfi-34)
34 #:use-module (srfi srfi-35)
35 #:re-export (%current-system
36 %current-target-system)
49 origin-imported-modules
52 <search-path-specification>
53 search-path-specification
54 search-path-specification?
55 search-path-specification->sexp
67 package-propagated-inputs
69 package-native-search-paths
76 package-supported-systems
80 package-field-location
83 package-transitive-inputs
84 package-transitive-target-inputs
85 package-transitive-native-inputs
86 package-transitive-propagated-inputs
87 package-transitive-supported-systems
88 package-source-derivation
90 package-cross-derivation
101 package-error-invalid-input
102 &package-cross-build-system-error
103 package-cross-build-system-error?
108 bag-transitive-inputs
109 bag-transitive-host-inputs
110 bag-transitive-build-inputs
111 bag-transitive-target-inputs))
115 ;;; This module provides a high-level mechanism to define packages in a
116 ;;; Guix-based distribution.
120 ;; The source of a package, such as a tarball URL and fetcher---called
121 ;; "origin" to avoid name clash with `package-source', `source', etc.
122 (define-record-type* <origin>
125 (uri origin-uri) ; string
126 (method origin-method) ; procedure
127 (sha256 origin-sha256) ; bytevector
128 (file-name origin-file-name (default #f)) ; optional file name
129 (patches origin-patches (default '())) ; list of file names
130 (snippet origin-snippet (default #f)) ; sexp or #f
131 (patch-flags origin-patch-flags ; list of strings
134 ;; Patching requires Guile, GNU Patch, and a few more. These two fields are
135 ;; used to specify these dependencies when needed.
136 (patch-inputs origin-patch-inputs ; input list or #f
138 (modules origin-modules ; list of module names
140 (imported-modules origin-imported-modules ; list of module names
142 (patch-guile origin-patch-guile ; package or #f
145 (define (print-origin origin port)
146 "Write a concise representation of ORIGIN to PORT."
148 (($ <origin> uri method sha256 file-name patches)
149 (simple-format port "#<origin ~s ~a ~s ~a>"
150 uri (bytevector->base32-string sha256)
152 (number->string (object-address origin) 16)))))
154 (set-record-type-printer! <origin> print-origin)
156 (define-syntax base32
158 "Return the bytevector corresponding to the given Nix-base32
162 (string? (syntax->datum #'str))
163 ;; A literal string: do the conversion at expansion time.
164 (with-syntax ((bv (nix-base32-string->bytevector
165 (syntax->datum #'str))))
168 #'(nix-base32-string->bytevector str)))))
170 ;; The specification of a search path.
171 (define-record-type* <search-path-specification>
172 search-path-specification make-search-path-specification
173 search-path-specification?
174 (variable search-path-specification-variable)
175 (directories search-path-specification-directories)
176 (separator search-path-specification-separator (default ":")))
178 (define (search-path-specification->sexp spec)
179 "Return an sexp representing SPEC, a <search-path-specification>. The sexp
180 corresponds to the arguments expected by `set-path-environment-variable'."
182 (($ <search-path-specification> variable directories separator)
183 ;; TODO: Allow other values of TYPE. See <http://bugs.gnu.org/18033>.
184 `(,variable ,directories ,separator directory))))
186 (define %supported-systems
187 ;; This is the list of system types that are supported. By default, we
188 ;; expect all packages to build successfully here.
189 '("x86_64-linux" "i686-linux" "mips64el-linux"))
192 (define-record-type* <package>
195 (name package-name) ; string
196 (version package-version) ; string
197 (source package-source) ; <origin> instance
198 (build-system package-build-system) ; build system
199 (arguments package-arguments ; arguments for the build method
200 (default '()) (thunked))
202 (inputs package-inputs ; input packages or derivations
203 (default '()) (thunked))
204 (propagated-inputs package-propagated-inputs ; same, but propagated
205 (default '()) (thunked))
206 (native-inputs package-native-inputs ; native input packages/derivations
207 (default '()) (thunked))
208 (self-native-input? package-self-native-input? ; whether to use itself as
209 ; a native input when cross-
210 (default #f)) ; compiling
212 (outputs package-outputs ; list of strings
216 ; <search-path-specification>,
217 ; for native and cross
219 (native-search-paths package-native-search-paths (default '()))
220 (search-paths package-search-paths (default '()))
221 (replacement package-replacement ; package | #f
222 (default #f) (thunked))
224 (synopsis package-synopsis) ; one-line description
225 (description package-description) ; one or two paragraphs
226 (license package-license)
227 (home-page package-home-page)
228 (supported-systems package-supported-systems ; list of strings
229 (default %supported-systems))
230 (maintainers package-maintainers (default '()))
232 (properties package-properties (default '())) ; alist for anything else
234 (location package-location
235 (default (and=> (current-source-location)
236 source-properties->location))))
238 (set-record-type-printer! <package>
239 (lambda (package port)
240 (let ((loc (package-location package))
241 (format simple-format))
242 (format port "#<package ~a-~a ~a~a>"
243 (package-name package)
244 (package-version package)
250 (number->string (object-address
254 (define (package-field-location package field)
255 "Return the source code location of the definition of FIELD for PACKAGE, or
256 #f if it could not be determined."
257 (define (goto port line column)
258 (unless (and (= (port-column port) (- column 1))
259 (= (port-line port) (- line 1)))
260 (unless (eof-object? (read-char port))
261 (goto port line column))))
263 (match (package-location package)
264 (($ <location> file line column)
267 ;; In general we want to keep relative file names for modules.
268 (with-fluids ((%file-port-name-canonicalization 'relative))
269 (call-with-input-file (search-path %load-path file)
271 (goto port line column)
273 (('package inits ...)
274 (let ((field (assoc field inits)))
277 ;; Put the `or' here, and not in the first argument of
278 ;; `and=>', to work around a compiler bug in 2.0.5.
279 (or (and=> (source-properties value)
280 source-properties->location)
281 (and=> (source-properties field)
282 source-properties->location)))
294 (define-condition-type &package-error &error
296 (package package-error-package))
298 (define-condition-type &package-input-error &package-error
300 (input package-error-invalid-input))
302 (define-condition-type &package-cross-build-system-error &package-error
303 package-cross-build-system-error?)
306 (define (package-full-name package)
307 "Return the full name of PACKAGE--i.e., `NAME-VERSION'."
308 (string-append (package-name package) "-" (package-version package)))
310 (define (%standard-patch-inputs)
311 (let ((ref (lambda (module var)
312 (module-ref (resolve-interface module) var))))
313 `(("tar" ,(ref '(gnu packages base) 'tar))
314 ("xz" ,(ref '(gnu packages compression) 'xz))
315 ("bzip2" ,(ref '(gnu packages compression) 'bzip2))
316 ("gzip" ,(ref '(gnu packages compression) 'gzip))
317 ("lzip" ,(ref '(gnu packages compression) 'lzip))
318 ("patch" ,(ref '(gnu packages base) 'patch)))))
320 (define (default-guile)
321 "Return the default Guile package for SYSTEM."
322 (let ((distro (resolve-interface '(gnu packages commencement))))
323 (module-ref distro 'guile-final)))
325 (define* (patch-and-repack store source patches
331 (imported-modules '())
332 (guile-for-build (%guile-for-build))
333 (system (%current-system)))
334 "Unpack SOURCE (a derivation or store path), apply all of PATCHES, and
335 repack the tarball using the tools listed in INPUTS. When SNIPPET is true,
336 it must be an s-expression that will run from within the directory where
337 SOURCE was unpacked, after all of PATCHES have been applied. MODULES and
338 IMPORTED-MODULES specify modules to use/import for use by SNIPPET."
339 (define source-file-name
340 ;; SOURCE is usually a derivation, but it could be a store file.
341 (if (derivation? source)
342 (derivation->output-path source)
345 (define decompression-type
346 (cond ((string-suffix? "gz" source-file-name) "gzip")
347 ((string-suffix? "bz2" source-file-name) "bzip2")
348 ((string-suffix? "lz" source-file-name) "lzip")
351 (define original-file-name
352 ;; Remove the store prefix plus the slash, hash, and hyphen.
353 (let* ((sans (string-drop source-file-name
354 (+ (string-length (%store-prefix)) 1)))
355 (dash (string-index sans #\-)))
356 (string-drop sans (+ 1 dash))))
358 (define (numeric-extension? file-name)
359 ;; Return true if FILE-NAME ends with digits.
360 (and=> (file-extension file-name)
361 (cut string-every char-set:hex-digit <>)))
363 (define (tarxz-name file-name)
364 ;; Return a '.tar.xz' file name based on FILE-NAME.
365 (let ((base (if (numeric-extension? file-name)
367 (file-sans-extension file-name))))
369 (if (equal? (file-extension base) "tar")
374 (map (lambda (number patch)
375 (list (string-append "patch" (number->string number))
378 (add-to-store store (basename patch) #t
381 (package-source-derivation store patch system)))))
382 (iota (length patches))
388 (use-modules (ice-9 ftw)
392 (let ((out (assoc-ref %outputs "out"))
393 (xz (assoc-ref %build-inputs "xz"))
394 (decomp (assoc-ref %build-inputs ,decompression-type))
395 (source (assoc-ref %build-inputs "source"))
396 (tar (string-append (assoc-ref %build-inputs "tar")
398 (patch (string-append (assoc-ref %build-inputs "patch")
400 (define (apply-patch input)
401 (let ((patch* (assoc-ref %build-inputs input)))
402 (format (current-error-port) "applying '~a'...~%" patch*)
404 ;; Use '--force' so that patches that do not apply perfectly are
406 (zero? (system* patch "--force" ,@flags "--input" patch*))))
408 (define (first-file directory)
409 ;; Return the name of the first file in DIRECTORY.
410 (car (scandir directory
412 (not (member name '("." "..")))))))
414 (setenv "PATH" (string-append xz "/bin" ":"
417 ;; SOURCE may be either a directory or a tarball.
418 (and (if (file-is-directory? source)
419 (let* ((store (or (getenv "NIX_STORE") "/gnu/store"))
420 (len (+ 1 (string-length store)))
421 (base (string-drop source len))
422 (dash (string-index base #\-))
423 (directory (string-drop base (+ 1 dash))))
425 (copy-recursively source directory)
427 (zero? (system* tar "xvf" source)))
428 (let ((directory (first-file ".")))
429 (format (current-error-port)
430 "source is under '~a'~%" directory)
433 (and (every apply-patch ',(map car patch-inputs))
436 `((let ((module (make-fresh-user-module)))
437 (module-use-interfaces! module
438 (map resolve-interface
440 (module-define! module '%build-inputs
442 (module-define! module '%outputs %outputs)
443 ((@ (system base compile) compile)
446 #:opts %auto-compilation-options
450 (begin (chdir "..") #t)
451 (zero? (system* tar "cvfa" out directory))))))))
454 (let ((name (tarxz-name original-file-name))
455 (inputs (filter-map (match-lambda
456 ((name (? package? p))
457 (and (member name (cons decompression-type
458 '("tar" "xz" "patch")))
460 (package-derivation store p system
462 (or inputs (%standard-patch-inputs))))
463 (modules (delete-duplicates (cons '(guix build utils) modules))))
465 (build-expression->derivation store name builder
466 #:inputs `(("source" ,source)
471 #:guile-for-build guile-for-build)))
473 (define* (package-source-derivation store source
474 #:optional (system (%current-system)))
475 "Return the derivation path for SOURCE, a package source, for SYSTEM."
477 (($ <origin> uri method sha256 name () #f)
478 ;; No patches, no snippet: this is a fixed-output derivation.
479 (method store uri 'sha256 sha256 name
481 (($ <origin> uri method sha256 name (patches ...) snippet
482 (flags ...) inputs (modules ...) (imported-modules ...)
484 ;; Patches and/or a snippet.
485 (let ((source (method store uri 'sha256 sha256 name
487 (guile (match (or guile-for-build (default-guile))
489 (package-derivation store p system
491 (patch-and-repack store source patches
497 #:imported-modules modules
498 #:guile-for-build guile)))
499 ((and (? string?) (? direct-store-path?) file)
502 (add-to-store store (basename file) #t "sha256" file))))
504 (define (transitive-inputs inputs)
505 (let loop ((inputs inputs)
509 (delete-duplicates (reverse result))) ; XXX: efficiency
510 (((and i (name (? package? p) sub ...)) rest ...)
511 (let ((t (map (match-lambda
512 ((dep-name derivation ...)
513 (cons (string-append name "/" dep-name)
515 (package-propagated-inputs p))))
516 (loop (append t rest)
517 (append t (cons i result)))))
519 (loop rest (cons input result))))))
521 (define (package-direct-inputs package)
522 "Return all the direct inputs of PACKAGE---i.e, its direct inputs along
523 with their propagated inputs."
524 (append (package-native-inputs package)
525 (package-inputs package)
526 (package-propagated-inputs package)))
528 (define (package-transitive-inputs package)
529 "Return the transitive inputs of PACKAGE---i.e., its direct inputs along
530 with their propagated inputs, recursively."
531 (transitive-inputs (package-direct-inputs package)))
533 (define (package-transitive-target-inputs package)
534 "Return the transitive target inputs of PACKAGE---i.e., its direct inputs
535 along with their propagated inputs, recursively. This only includes inputs
536 for the target system, and not native inputs."
537 (transitive-inputs (append (package-inputs package)
538 (package-propagated-inputs package))))
540 (define (package-transitive-native-inputs package)
541 "Return the transitive native inputs of PACKAGE---i.e., its direct inputs
542 along with their propagated inputs, recursively. This only includes inputs
543 for the host system (\"native inputs\"), and not target inputs."
544 (transitive-inputs (package-native-inputs package)))
546 (define (package-transitive-propagated-inputs package)
547 "Return the propagated inputs of PACKAGE, and their propagated inputs,
549 (transitive-inputs (package-propagated-inputs package)))
551 (define-syntax define-memoized/v
553 "Define a memoized single-valued unary procedure with docstring.
554 The procedure argument is compared to cached keys using `eqv?'."
556 ((_ (proc arg) docstring body body* ...)
557 (string? (syntax->datum #'docstring))
559 (let ((cache (make-hash-table)))
562 (match (hashv-get-handle cache arg)
566 (let ((result (let () body body* ...)))
567 (hashv-set! cache arg result)
571 (define-memoized/v (package-transitive-supported-systems package)
572 "Return the intersection of the systems supported by PACKAGE and those
573 supported by its dependencies."
574 (fold (lambda (input systems)
576 ((label (? package? p) . _)
578 string=? systems (package-transitive-supported-systems p)))
581 (package-supported-systems package)
582 (package-direct-inputs package)))
584 (define (bag-transitive-inputs bag)
585 "Same as 'package-transitive-inputs', but applied to a bag."
586 (transitive-inputs (append (bag-build-inputs bag)
587 (bag-host-inputs bag)
588 (bag-target-inputs bag))))
590 (define (bag-transitive-build-inputs bag)
591 "Same as 'package-transitive-native-inputs', but applied to a bag."
592 (transitive-inputs (bag-build-inputs bag)))
594 (define (bag-transitive-host-inputs bag)
595 "Same as 'package-transitive-target-inputs', but applied to a bag."
596 (transitive-inputs (bag-host-inputs bag)))
598 (define (bag-transitive-target-inputs bag)
599 "Return the \"target inputs\" of BAG, recursively."
600 (transitive-inputs (bag-target-inputs bag)))
604 ;;; Package derivations.
607 (define %derivation-cache
608 ;; Package to derivation-path mapping.
609 (make-weak-key-hash-table 100))
611 (define (cache package system thunk)
612 "Memoize the return values of THUNK as the derivation of PACKAGE on
614 ;; FIXME: This memoization should be associated with the open store, because
615 ;; otherwise it breaks when switching to a different store.
616 (let ((vals (call-with-values thunk list)))
617 ;; Use `hashq-set!' instead of `hash-set!' because `hash' returns the
618 ;; same value for all structs (as of Guile 2.0.6), and because pointer
619 ;; equality is sufficient in practice.
620 (hashq-set! %derivation-cache package
622 ,@(or (hashq-ref %derivation-cache package)
624 (apply values vals)))
626 (define-syntax-rule (cached package system body ...)
627 "Memoize the result of BODY for the arguments PACKAGE and SYSTEM.
628 Return the cached result when available."
629 (let ((thunk (lambda () body ...))
631 (match (hashq-ref %derivation-cache package)
633 (match (assoc-ref alist key)
637 (cache package key thunk))))
639 (cache package key thunk)))))
641 (define* (expand-input store package input system #:optional cross-system)
642 "Expand INPUT, an input tuple, such that it contains only references to
643 derivation paths or store paths. PACKAGE is only used to provide contextual
644 information in exceptions."
645 (define (intern file)
646 ;; Add FILE to the store. Set the `recursive?' bit to #t, so that
647 ;; file permissions are preserved.
648 (add-to-store store (basename file) #t "sha256" file))
652 (cut package-cross-derivation store <> cross-system system
654 (cut package-derivation store <> system #:graft? #f)))
657 (((? string? name) (? package? package))
658 (list name (derivation package)))
659 (((? string? name) (? package? package)
661 (list name (derivation package)
664 (and (? string?) (? derivation-path?) drv))
667 (and (? string?) (? file-exists? file)))
668 ;; Add FILE to the store. When FILE is in the sub-directory of a
669 ;; store path, it needs to be added anyway, so it can be used as a
671 (list name (intern file)))
672 (((? string? name) (? origin? source))
673 (list name (package-source-derivation store source system)))
675 (raise (condition (&package-input-error
680 ;; Whether to honor package grafts by default.
683 (define* (package->bag package #:optional
684 (system (%current-system))
685 (target (%current-target-system))
686 #:key (graft? (%graft?)))
687 "Compile PACKAGE into a bag for SYSTEM, possibly cross-compiled to TARGET,
689 ;; Bind %CURRENT-SYSTEM and %CURRENT-TARGET-SYSTEM so that thunked field
690 ;; values can refer to it.
691 (parameterize ((%current-system system)
692 (%current-target-system target))
694 (or (package-replacement package) package)
696 (($ <package> name version source build-system
697 args inputs propagated-inputs native-inputs self-native-input?
699 (or (make-bag build-system (string-append name "-" version)
703 #:inputs (append (inputs)
706 #:native-inputs `(,@(if (and target self-native-input?)
713 (&package-cross-build-system-error
717 (package package))))))))))
719 (define (input-graft store system)
720 "Return a procedure that, given an input referring to a package with a
721 graft, returns a pair with the original derivation and the graft's derivation,
722 and returns #f for other inputs."
724 ((label (? package? package) sub-drv ...)
725 (let ((replacement (package-replacement package)))
727 (let ((orig (package-derivation store package system
729 (new (package-derivation store replacement system)))
733 (origin-output (match sub-drv
736 (replacement-output origin-output))))))
740 (define (input-cross-graft store target system)
741 "Same as 'input-graft', but for cross-compilation inputs."
743 ((label (? package? package) sub-drv ...)
744 (let ((replacement (package-replacement package)))
746 (let ((orig (package-cross-derivation store package target system
748 (new (package-cross-derivation store replacement
753 (origin-output (match sub-drv
756 (replacement-output origin-output))))))
760 (define* (bag-grafts store bag)
761 "Return the list of grafts applicable to BAG. Each graft is a <graft>
763 (let ((target (bag-target bag))
764 (system (bag-system bag)))
765 (define native-grafts
766 (filter-map (input-graft store system)
767 (append (bag-transitive-build-inputs bag)
768 (bag-transitive-target-inputs bag)
771 (bag-transitive-host-inputs bag)))))
773 (define target-grafts
775 (filter-map (input-cross-graft store target system)
776 (bag-transitive-host-inputs bag))
779 (append native-grafts target-grafts)))
781 (define* (package-grafts store package
782 #:optional (system (%current-system))
784 "Return the list of grafts applicable to PACKAGE as built for SYSTEM and
786 (let* ((package (or (package-replacement package) package))
787 (bag (package->bag package system target)))
788 (bag-grafts store bag)))
790 (define* (bag->derivation store bag
792 "Return the derivation to build BAG for SYSTEM. Optionally, CONTEXT can be
793 a package object describing the context in which the call occurs, for improved
796 (bag->cross-derivation store bag)
797 (let* ((system (bag-system bag))
798 (inputs (bag-transitive-inputs bag))
799 (input-drvs (map (cut expand-input store context <> system)
801 (paths (delete-duplicates
802 (append-map (match-lambda
803 ((_ (? package? p) _ ...)
804 (package-native-search-paths
809 (apply (bag-build bag)
810 store (bag-name bag) input-drvs
812 #:outputs (bag-outputs bag) #:system system
813 (bag-arguments bag)))))
815 (define* (bag->cross-derivation store bag
817 "Return the derivation to build BAG, which is actually a cross build.
818 Optionally, CONTEXT can be a package object denoting the context of the call.
819 This is an internal procedure."
820 (let* ((system (bag-system bag))
821 (target (bag-target bag))
822 (host (bag-transitive-host-inputs bag))
823 (host-drvs (map (cut expand-input store context <> system target)
825 (target* (bag-transitive-target-inputs bag))
826 (target-drvs (map (cut expand-input store context <> system)
828 (build (bag-transitive-build-inputs bag))
829 (build-drvs (map (cut expand-input store context <> system)
831 (all (append build target* host))
832 (paths (delete-duplicates
833 (append-map (match-lambda
834 ((_ (? package? p) _ ...)
835 (package-search-paths p))
838 (npaths (delete-duplicates
839 (append-map (match-lambda
840 ((_ (? package? p) _ ...)
841 (package-native-search-paths
846 (apply (bag-build bag)
848 #:native-drvs build-drvs
849 #:target-drvs (append host-drvs target-drvs)
851 #:native-search-paths npaths
852 #:outputs (bag-outputs bag)
853 #:system system #:target target
854 (bag-arguments bag))))
856 (define* (package-derivation store package
857 #:optional (system (%current-system))
858 #:key (graft? (%graft?)))
859 "Return the <derivation> object of PACKAGE for SYSTEM."
861 ;; Compute the derivation and cache the result. Caching is important
862 ;; because some derivations, such as the implicit inputs of the GNU build
863 ;; system, will be queried many, many times in a row.
864 (cached package (cons system graft?)
865 (let* ((bag (package->bag package system #f #:graft? graft?))
866 (drv (bag->derivation store bag package)))
868 (match (bag-grafts store bag)
872 (let ((guile (package-derivation store (default-guile)
873 system #:graft? #f)))
874 (graft-derivation store (bag-name bag) drv grafts
879 (define* (package-cross-derivation store package target
880 #:optional (system (%current-system))
881 #:key (graft? (%graft?)))
882 "Cross-build PACKAGE for TARGET (a GNU triplet) from host SYSTEM (a Guix
883 system identifying string)."
884 (cached package (list system target graft?)
885 (let* ((bag (package->bag package system target #:graft? graft?))
886 (drv (bag->derivation store bag package)))
888 (match (bag-grafts store bag)
892 (graft-derivation store (bag-name bag) drv grafts
895 (package-derivation store (default-guile)
896 system #:graft? #f))))
899 (define* (package-output store package
900 #:optional (output "out") (system (%current-system)))
901 "Return the output path of PACKAGE's OUTPUT for SYSTEM---where OUTPUT is the
902 symbolic output name, such as \"out\". Note that this procedure calls
903 `package-derivation', which is costly."
904 (let ((drv (package-derivation store package system)))
905 (derivation->output-path drv output)))