build-system/clojure: Provide only the right modules in scope.
Previously, we used to have a whole bunch of (guix build *-build-system) modules in scope, which, for example, meant that '%standard-phases' was clashing. This change clarifies it. * guix/build-system/clojure.scm (%default-modules): New variable. (clojure-build): Change the default value of #:modules and that of #:phases.
This commit is contained in:
		
							parent
							
								
									639e641cdf
								
							
						
					
					
						commit
						984efa2b6a
					
				
					 1 changed files with 10 additions and 4 deletions
				
			
		| 
						 | 
					@ -1,5 +1,6 @@
 | 
				
			||||||
;;; GNU Guix --- Functional package management for GNU
 | 
					;;; GNU Guix --- Functional package management for GNU
 | 
				
			||||||
;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
 | 
					;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
 | 
				
			||||||
 | 
					;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org>
 | 
				
			||||||
;;;
 | 
					;;;
 | 
				
			||||||
;;; This file is part of GNU Guix.
 | 
					;;; This file is part of GNU Guix.
 | 
				
			||||||
;;;
 | 
					;;;
 | 
				
			||||||
| 
						 | 
					@ -43,12 +44,18 @@
 | 
				
			||||||
;; Code:
 | 
					;; Code:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define-with-docs %clojure-build-system-modules
 | 
					(define-with-docs %clojure-build-system-modules
 | 
				
			||||||
  "Build-side modules imported and used by default."
 | 
					  "Build-side modules imported by default."
 | 
				
			||||||
  `((guix build clojure-build-system)
 | 
					  `((guix build clojure-build-system)
 | 
				
			||||||
    (guix build clojure-utils)
 | 
					    (guix build clojure-utils)
 | 
				
			||||||
    (guix build guile-build-system)
 | 
					    (guix build guile-build-system)
 | 
				
			||||||
    ,@%ant-build-system-modules))
 | 
					    ,@%ant-build-system-modules))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(define %default-modules
 | 
				
			||||||
 | 
					  ;; Modules in scope in the build-side environment.
 | 
				
			||||||
 | 
					  '((guix build clojure-build-system)
 | 
				
			||||||
 | 
					    (guix build clojure-utils)
 | 
				
			||||||
 | 
					    (guix build utils)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define-with-docs %default-clojure
 | 
					(define-with-docs %default-clojure
 | 
				
			||||||
  "The default Clojure package."
 | 
					  "The default Clojure package."
 | 
				
			||||||
  (delay (@* (gnu packages clojure) clojure)))
 | 
					  (delay (@* (gnu packages clojure) clojure)))
 | 
				
			||||||
| 
						 | 
					@ -133,15 +140,14 @@
 | 
				
			||||||
                        (test-include `',%test-include)
 | 
					                        (test-include `',%test-include)
 | 
				
			||||||
                        (test-exclude `',%test-exclude)
 | 
					                        (test-exclude `',%test-exclude)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        (phases '(@ (guix build clojure-build-system)
 | 
					                        (phases '%standard-phases)
 | 
				
			||||||
                                    %standard-phases))
 | 
					 | 
				
			||||||
                        (outputs '("out"))
 | 
					                        (outputs '("out"))
 | 
				
			||||||
                        (search-paths '())
 | 
					                        (search-paths '())
 | 
				
			||||||
                        (system (%current-system))
 | 
					                        (system (%current-system))
 | 
				
			||||||
                        (guile #f)
 | 
					                        (guile #f)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        (imported-modules %clojure-build-system-modules)
 | 
					                        (imported-modules %clojure-build-system-modules)
 | 
				
			||||||
                        (modules %clojure-build-system-modules))
 | 
					                        (modules %default-modules))
 | 
				
			||||||
  "Build SOURCE with INPUTS."
 | 
					  "Build SOURCE with INPUTS."
 | 
				
			||||||
  (let ((builder `(begin
 | 
					  (let ((builder `(begin
 | 
				
			||||||
                    (use-modules ,@modules)
 | 
					                    (use-modules ,@modules)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue