packages: Add `package-full-name'.

* guix/packages.scm (package-full-name): New procedure.
  (package-derivation): Use it.
This commit is contained in:
Ludovic Courtès 2012-09-05 19:01:47 +02:00
parent 609354bf0a
commit 2847050a61

@ -37,6 +37,7 @@
package? package?
package-name package-name
package-version package-version
package-full-name
package-source package-source
package-build-system package-build-system
package-arguments package-arguments
@ -159,6 +160,10 @@ representation."
(input package-error-invalid-input)) (input package-error-invalid-input))
(define (package-full-name package)
"Return the full name of PACKAGE--i.e., `NAME-VERSION'."
(string-append (package-name package) "-" (package-version package)))
(define (package-source-derivation store source) (define (package-source-derivation store source)
"Return the derivation path for SOURCE, a package source." "Return the derivation path for SOURCE, a package source."
(match source (match source
@ -252,7 +257,7 @@ recursively."
;; row. ;; row.
(cache package system (cache package system
(apply builder (apply builder
store (string-append name "-" version) store (package-full-name package)
(package-source-derivation store source) (package-source-derivation store source)
inputs inputs
#:outputs outputs #:system system #:outputs outputs #:system system