gexp: Add #:guile parameter to 'load-path-expression'.
* guix/gexp.scm (load-path-expression): Add #:guile parameter and honor it.
This commit is contained in:
		
							parent
							
								
									3a5fbced6f
								
							
						
					
					
						commit
						58210fbea2
					
				
					 1 changed files with 15 additions and 10 deletions
				
			
		| 
						 | 
					@ -1735,21 +1735,26 @@ TARGET, a GNU triplet."
 | 
				
			||||||
              'guile-3.0))
 | 
					              'guile-3.0))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define* (load-path-expression modules #:optional (path %load-path)
 | 
					(define* (load-path-expression modules #:optional (path %load-path)
 | 
				
			||||||
                               #:key (extensions '()) system target)
 | 
					                               #:key (extensions '()) system target
 | 
				
			||||||
 | 
					                               (guile (default-guile)))
 | 
				
			||||||
  "Return as a monadic value a gexp that sets '%load-path' and
 | 
					  "Return as a monadic value a gexp that sets '%load-path' and
 | 
				
			||||||
'%load-compiled-path' to point to MODULES, a list of module names.  MODULES
 | 
					'%load-compiled-path' to point to MODULES, a list of module names.  MODULES
 | 
				
			||||||
are searched for in PATH.  Return #f when MODULES and EXTENSIONS are empty."
 | 
					are searched for in PATH.  Return #f when MODULES and EXTENSIONS are empty.
 | 
				
			||||||
 | 
					Assume MODULES are compiled with GUILE."
 | 
				
			||||||
  (if (and (null? modules) (null? extensions))
 | 
					  (if (and (null? modules) (null? extensions))
 | 
				
			||||||
      (with-monad %store-monad
 | 
					      (with-monad %store-monad
 | 
				
			||||||
        (return #f))
 | 
					        (return #f))
 | 
				
			||||||
      (mlet %store-monad ((modules  (imported-modules modules
 | 
					      (mlet* %store-monad ((guile    (lower-object guile system #:target #f))
 | 
				
			||||||
                                                      #:module-path path
 | 
					 | 
				
			||||||
                                                      #:system system))
 | 
					 | 
				
			||||||
                           (compiled (compiled-modules modules
 | 
					                           (compiled (compiled-modules modules
 | 
				
			||||||
 | 
					                                                       #:guile guile
 | 
				
			||||||
                                                       #:extensions extensions
 | 
					                                                       #:extensions extensions
 | 
				
			||||||
                                                       #:module-path path
 | 
					                                                       #:module-path path
 | 
				
			||||||
                                                       #:system system
 | 
					                                                       #:system system
 | 
				
			||||||
                                                      #:target target)))
 | 
					                                                       #:target target))
 | 
				
			||||||
 | 
					                           (modules  (imported-modules modules
 | 
				
			||||||
 | 
					                                                       #:guile guile
 | 
				
			||||||
 | 
					                                                       #:module-path path
 | 
				
			||||||
 | 
					                                                       #:system system)))
 | 
				
			||||||
        (return
 | 
					        (return
 | 
				
			||||||
         (gexp (eval-when (expand load eval)
 | 
					         (gexp (eval-when (expand load eval)
 | 
				
			||||||
                 ;; Augment the load paths and delete duplicates.  Do that
 | 
					                 ;; Augment the load paths and delete duplicates.  Do that
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue