summaryrefslogtreecommitdiff
path: root/guix/build/lisp-utils.scm
diff options
context:
space:
mode:
authorAndy Patterson <ajpatter@uwaterloo.ca>2017-04-03 09:01:29 -0400
committerRicardo Wurmus <rekado@elephly.net>2017-05-16 15:18:15 +0200
commit0186a463d0f352eef485326cf57619d23a26734e (patch)
treedc9edd8b745bcaf2e930b5b782e4fbe8e3d7866b /guix/build/lisp-utils.scm
parent457702b1d9bea593d51e5187b2f104d553fafce4 (diff)
downloadguix-patches-0186a463d0f352eef485326cf57619d23a26734e.tar
guix-patches-0186a463d0f352eef485326cf57619d23a26734e.tar.gz
build-system/asdf: Always pre-load the system's definition file.
* guix/build-system/asdf.scm (asdf-build)[builder]: Pass a default `#:asd-file' argument to the build procedure, using the system's name. * guix/build/asdf-build-system.scm (build, check): Adjust to assume that `asd-file' will always be a string. * guix/build/lisp-utils.scm (compile-system, system-dependencies) (test-system): Likewise.
Diffstat (limited to 'guix/build/lisp-utils.scm')
-rw-r--r--guix/build/lisp-utils.scm27
1 files changed, 9 insertions, 18 deletions
diff --git a/guix/build/lisp-utils.scm b/guix/build/lisp-utils.scm
index 2d730570a1..3f7a6f77c1 100644
--- a/guix/build/lisp-utils.scm
+++ b/guix/build/lisp-utils.scm
@@ -112,15 +112,12 @@ with PROGRAM."
(define (compile-system system asd-file)
"Use a lisp implementation to compile SYSTEM using asdf. Load ASD-FILE
-first if SYSTEM is defined there."
+first."
(lisp-eval-program
`(progn
(require :asdf)
- (in-package :asdf)
- ,@(if asd-file
- `((load ,asd-file))
- '())
- (in-package :cl-user)
+ (let ((*package* (find-package :asdf)))
+ (load ,asd-file))
(funcall (find-symbol
(symbol-name :operate)
(symbol-name :asdf))
@@ -131,15 +128,13 @@ first if SYSTEM is defined there."
(define (system-dependencies system asd-file)
"Return the dependencies of SYSTEM, as reported by
-asdf:system-depends-on. First load the system's ASD-FILE, if necessary."
+asdf:system-depends-on. First load the system's ASD-FILE."
(define deps-file ".deps.sexp")
(define program
`(progn
(require :asdf)
- ,@(if asd-file
- `((let ((*package* (find-package :asdf)))
- (load ,asd-file)))
- '())
+ (let ((*package* (find-package :asdf)))
+ (load ,asd-file))
(with-open-file
(stream ,deps-file :direction :output)
(format stream
@@ -183,16 +178,12 @@ asdf:system-depends-on. First load the system's ASD-FILE, if necessary."
'())))
(define (test-system system asd-file)
- "Use a lisp implementation to test SYSTEM using asdf. Load ASD-FILE first
-if SYSTEM is defined there."
+ "Use a lisp implementation to test SYSTEM using asdf. Load ASD-FILE first."
(lisp-eval-program
`(progn
(require :asdf)
- (in-package :asdf)
- ,@(if asd-file
- `((load ,asd-file))
- '())
- (in-package :cl-user)
+ (let ((*package* (find-package :asdf)))
+ (load ,asd-file))
(funcall (find-symbol
(symbol-name :test-system)
(symbol-name :asdf))