summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-07-01 17:32:03 +0200
committerLudovic Courtès <ludo@gnu.org>2012-07-02 01:35:34 +0200
commit062c6927adf60d369ae00f8e191168c0b19b093a (patch)
tree9356077e3eb06dae6de2e7a2168f1c6e58bd48f7
parenta1e4a93693a3d5935f148609c8567dece676d889 (diff)
downloadguix-062c6927adf60d369ae00f8e191168c0b19b093a.tar.gz
Add `propagated-inputs' and `properties' to <package>.
* guix/packages.scm (<package>)[propagated-inputs, properties]: New
  fields.
  (package-derivation): Update `match' clause.
-rw-r--r--guix/packages.scm14
1 files changed, 12 insertions, 2 deletions
diff --git a/guix/packages.scm b/guix/packages.scm
index b00198f4af..3f8f880b29 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -21,6 +21,7 @@
   #:use-module (guix store)
   #:use-module (guix build-system)
   #:use-module (ice-9 match)
+  #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-9)
   #:export (location
             location?
@@ -44,6 +45,7 @@
             package-arguments
             package-inputs
             package-native-inputs
+            package-propagated-inputs
             package-outputs
             package-search-paths
             package-description
@@ -51,6 +53,7 @@
             package-license
             package-platforms
             package-maintainers
+            package-properties
             package-location
 
             package-source-derivation
@@ -109,10 +112,14 @@ etc."
   (build-system package-build-system)     ; build system
   (arguments package-arguments            ; arguments for the build method
              (default '()))
+
   (inputs package-inputs                  ; input packages or derivations
           (default '()))
+  (propagated-inputs package-propagated-inputs    ; same, but propagated
+                     (default '()))
   (native-inputs package-native-inputs    ; native input packages/derivations
                  (default '()))
+
   (outputs package-outputs                ; list of strings
            (default '("out")))
   (search-paths package-search-paths      ; list of (ENV-VAR (DIRS ...))
@@ -127,6 +134,8 @@ etc."
   (platforms package-platforms (default '()))
   (maintainers package-maintainers (default '()))
 
+  (properties package-properties (default '()))   ; alist for anything else
+
   (location package-location
             (default (and=> (current-source-location)
                             source-properties->location))))
@@ -142,7 +151,7 @@ etc."
   "Return the derivation of PACKAGE for SYSTEM."
   (match package
     (($ <package> name version source (= build-system-builder builder)
-        args inputs native-inputs outputs)
+        args inputs native-inputs propagated-inputs outputs)
      ;; TODO: For `search-paths', add a builder prologue that calls
      ;; `set-path-environment-variable'.
      (let ((inputs (map (match-lambda
@@ -155,7 +164,8 @@ etc."
                          (((? string? name)
                            (and (? string?) (? derivation-path?) drv))
                           (list name drv)))
-                        (append native-inputs inputs))))
+                        (concatenate (list native-inputs inputs
+                                           propagated-inputs)))))
        (apply builder
               store (string-append name "-" version)
               (package-source-derivation store source)