guix build: Gracefully handle packages without source for '-S'.
Fixes <http://bugs.gnu.org/22836>. Reported by Ricardo Wurmus <rekado@elephly.net>. * guix/scripts/build.scm (options->derivations): Gracefully handle (package-source p) = #f.
This commit is contained in:
		
							parent
							
								
									3c185b24f5
								
							
						
					
					
						commit
						8a54c0ec69
					
				
					 1 changed files with 10 additions and 2 deletions
				
			
		|  | @ -595,8 +595,16 @@ build." | ||||||
|                        (#f |                        (#f | ||||||
|                         (list (package->derivation store p system))) |                         (list (package->derivation store p system))) | ||||||
|                        (#t |                        (#t | ||||||
|                         (let ((s (package-source p))) |                         (match (package-source p) | ||||||
|                           (list (package-source-derivation store s)))) |                           (#f | ||||||
|  |                            (format (current-error-port) | ||||||
|  |                                    (_ "~a: warning: \ | ||||||
|  | package '~a' has no source~%") | ||||||
|  |                                    (location->string (package-location p)) | ||||||
|  |                                    (package-name p)) | ||||||
|  |                            '()) | ||||||
|  |                           (s | ||||||
|  |                            (list (package-source-derivation store s))))) | ||||||
|                        (proc |                        (proc | ||||||
|                         (map (cut package-source-derivation store <>) |                         (map (cut package-source-derivation store <>) | ||||||
|                              (proc p)))))) |                              (proc p)))))) | ||||||
|  |  | ||||||
		Reference in a new issue