summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-09-05 19:01:47 +0200
committerLudovic Courtès <ludo@gnu.org>2012-09-05 19:01:47 +0200
commit2847050a61ac647d664d3da188a3e4504ffd422d (patch)
treefc6e86bf9c59203162daf0fc07c122fa23414bd4
parent609354bf0a361cb9217a3b43f270c7a986b54f63 (diff)
downloadguix-2847050a61ac647d664d3da188a3e4504ffd422d.tar.gz
packages: Add `package-full-name'.
* guix/packages.scm (package-full-name): New procedure.
  (package-derivation): Use it.
-rw-r--r--guix/packages.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/guix/packages.scm b/guix/packages.scm
index e41e6ed831..094f8157d0 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -37,6 +37,7 @@
             package?
             package-name
             package-version
+            package-full-name
             package-source
             package-build-system
             package-arguments
@@ -159,6 +160,10 @@ representation."
   (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)
   "Return the derivation path for SOURCE, a package source."
   (match source
@@ -252,7 +257,7 @@ recursively."
            ;; row.
            (cache package system
                   (apply builder
-                         store (string-append name "-" version)
+                         store (package-full-name package)
                          (package-source-derivation store source)
                          inputs
                          #:outputs outputs #:system system