diff options
| author | Marius Bakke <mbakke@fastmail.com> | 2018-06-11 23:52:15 +0200 | 
|---|---|---|
| committer | Marius Bakke <mbakke@fastmail.com> | 2018-06-11 23:52:15 +0200 | 
| commit | a032b4454b3fc67e11e9fc2d8c2345288065fa29 (patch) | |
| tree | c208124b79dbd2224b68c52106aa72ff2ebfa7ab /guix/scripts/build.scm | |
| parent | b5724230fed2d043206df20d12a45bb962b7ee77 (diff) | |
| parent | 6321ce42ab4d9ab788d858cb19bde4aa7a0e3ecc (diff) | |
Merge branch 'master' into staging
Diffstat (limited to 'guix/scripts/build.scm')
| -rw-r--r-- | guix/scripts/build.scm | 76 | 
1 files changed, 40 insertions, 36 deletions
| diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm index 401087e830..4dd4fbccdf 100644 --- a/guix/scripts/build.scm +++ b/guix/scripts/build.scm @@ -661,43 +661,47 @@ build."    (define system (assoc-ref opts 'system))    (define graft? (assoc-ref opts 'graft?)) -  (parameterize ((%graft? graft?)) -    (append-map (match-lambda -                  ((? package? p) -                   (let ((p (or (and graft? (package-replacement p)) p))) -                     (match src -                       (#f -                        (list (package->derivation store p system))) -                       (#t -                        (match (package-source p) -                          (#f -                           (format (current-error-port) -                                   (G_ "~a: warning: \ +  ;; We may get 'unbound-variable' errors while evaluating the 'inputs' fields +  ;; of user packages.  Since 'guix build' is the primary tool for people +  ;; testing new packages, report such errors gracefully. +  (with-unbound-variable-handling +   (parameterize ((%graft? graft?)) +     (append-map (match-lambda +                   ((? package? p) +                    (let ((p (or (and graft? (package-replacement p)) p))) +                      (match src +                        (#f +                         (list (package->derivation store p system))) +                        (#t +                         (match (package-source p) +                           (#f +                            (format (current-error-port) +                                    (G_ "~a: warning: \  package '~a' has no source~%") -                                   (location->string (package-location p)) -                                   (package-name p)) -                           '()) -                          (s -                           (list (package-source-derivation store s))))) -                       (proc -                        (map (cut package-source-derivation store <>) -                             (proc p)))))) -                  ((? derivation? drv) -                   (list drv)) -                  ((? procedure? proc) -                   (list (run-with-store store -                           (mbegin %store-monad -                             (set-guile-for-build (default-guile)) -                             (proc)) -                           #:system system))) -                  ((? gexp? gexp) -                   (list (run-with-store store -                           (mbegin %store-monad -                             (set-guile-for-build (default-guile)) -                             (gexp->derivation "gexp" gexp -                                               #:system system)))))) -                (map (cut transform store <>) -                     (options->things-to-build opts))))) +                                    (location->string (package-location p)) +                                    (package-name p)) +                            '()) +                           (s +                            (list (package-source-derivation store s))))) +                        (proc +                         (map (cut package-source-derivation store <>) +                              (proc p)))))) +                   ((? derivation? drv) +                    (list drv)) +                   ((? procedure? proc) +                    (list (run-with-store store +                            (mbegin %store-monad +                              (set-guile-for-build (default-guile)) +                              (proc)) +                            #:system system))) +                   ((? gexp? gexp) +                    (list (run-with-store store +                            (mbegin %store-monad +                              (set-guile-for-build (default-guile)) +                              (gexp->derivation "gexp" gexp +                                                #:system system)))))) +                 (map (cut transform store <>) +                      (options->things-to-build opts))))))  (define (show-build-log store file urls)    "Show the build log for FILE, falling back to remote logs from URLS if | 
