[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/02: packages: Make sure the patch inputs are not #f.
From: |
Ludovic Courtès |
Subject: |
02/02: packages: Make sure the patch inputs are not #f. |
Date: |
Sat, 21 Mar 2015 21:09:05 +0000 |
civodul pushed a commit to branch core-updates
in repository guix.
commit a158484db41f1662032609da61cd3ae9f292607b
Author: Ludovic Courtès <address@hidden>
Date: Sat Mar 21 22:07:11 2015 +0100
packages: Make sure the patch inputs are not #f.
Fixes build issues whereby #:inputs would be #f. See
<http://hydra.gnu.org/build/320333/nixlog/4/tail-reload>.
* guix/packages.scm (patch-and-repack): #:input defaults to #f.
[lookup-input]: When INPUTS is #f, use (%standard-patch-inputs).
---
guix/packages.scm | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/guix/packages.scm b/guix/packages.scm
index 69cfd6d..ca9d3a9 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -353,7 +353,7 @@ the build code of derivation."
(define* (patch-and-repack source patches
#:key
- (inputs (%standard-patch-inputs))
+ inputs
(snippet #f)
(flags '("-p1"))
(modules '())
@@ -371,10 +371,14 @@ IMPORTED-MODULES specify modules to use/import for use by
SNIPPET."
(derivation->output-path source)
source))
- (define (lookup-input name)
- (match (assoc-ref inputs name)
- ((package) package)
- (#f #f)))
+ (define lookup-input
+ ;; The default value of the 'patch-inputs' field, and thus INPUTS is #f,
+ ;; so deal with that.
+ (let ((inputs (or inputs (%standard-patch-inputs))))
+ (lambda (name)
+ (match (assoc-ref inputs name)
+ ((package) package)
+ (#f #f)))))
(define decompression-type
(cond ((string-suffix? "gz" source-file-name) "gzip")