diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-01-07 22:23:50 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-01-07 22:23:50 +0100 |
commit | ab8ed44fcee9208ecb8d61a5060aa204a6fb6f06 (patch) | |
tree | 37219008a21bf4d374c89ddfa6df62d1745a1110 /guix | |
parent | 708d0ceb5067f81301d0f584142bfa733fbf0ff1 (diff) |
snix: Gracefully handle `null' in Nix build inputs.
* guix/snix.scm (snix-derivation->guix-package)[convert-inputs]:
Gracefully handle `null' as an input.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/snix.scm | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/guix/snix.scm b/guix/snix.scm index c90893bdfe..0196ce925b 100644 --- a/guix/snix.scm +++ b/guix/snix.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2010, 2011, 2012 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2010, 2011, 2012, 2013 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -366,15 +366,18 @@ location of DERIVATION." attribute-value) (#f '()) - ((('derivation _ _ (attributes ...)) ...) - (map (lambda (attrs) - (let* ((full-name (attribute-value - (find-attribute-by-name "name" attrs))) - (name (package-name->name+version full-name))) - (list name - (list 'unquote - (string->symbol name))))) - attributes)))) + ((inputs ...) + ;; Inputs can be either derivations or the null value. + (filter-map (match-lambda + (('derivation _ _ (attributes ...)) + (let* ((full-name + (attribute-value + (find-attribute-by-name "name" attributes))) + (name (package-name->name+version full-name))) + (list name + (list 'unquote (string->symbol name))))) + ('null #f)) + inputs)))) (define (maybe-inputs guix-name inputs) (match inputs |