packages: Allow inputs that are local files.
authorLudovic Courtès <ludo@gnu.org>
Sun, 1 Jul 2012 15:32:03 +0000 (17:32 +0200)
committerLudovic Courtès <ludo@gnu.org>
Wed, 4 Jul 2012 23:20:05 +0000 (01:20 +0200)
* guix/packages.scm (package-derivation): Add to the store inputs that
  are local files.

guix/packages.scm

index c3a1764..2d269ad 100644 (file)
@@ -179,7 +179,13 @@ representation."
                                 sub-drv))
                          (((? string? name)
                            (and (? string?) (? derivation-path?) drv))
-                          (list name drv)))
+                          (list name drv))
+                         (((? string? name)
+                           (and (? string?) (? (negate store-path?))
+                                (? file-exists? file)))
+                          (list name
+                                (add-to-store store (basename file)
+                                              #t #f "sha256" file))))
                         (concatenate (list native-inputs inputs
                                            propagated-inputs)))))
        (apply builder