diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-01-19 22:01:33 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-01-19 23:11:37 +0100 |
commit | 358f66a004bc232aca1c51d04776a2ae0c1fbc9a (patch) | |
tree | 4a946364c4b4e953a39cf07af9002f89432def5d /guix/scripts/repl.scm | |
parent | eb6025322017e9096470b449a0dfb2be65668402 (diff) |
repl: Avoid dependency on high-level package modules.
* guix/scripts/repl.scm: Remove imports of (guix scripts build), (gnu
packages), (guix utils), and (guix packages).
(%options): Define "--load-path" option right here.
Diffstat (limited to 'guix/scripts/repl.scm')
-rw-r--r-- | guix/scripts/repl.scm | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/guix/scripts/repl.scm b/guix/scripts/repl.scm index a9268da29e..ff1f208894 100644 --- a/guix/scripts/repl.scm +++ b/guix/scripts/repl.scm @@ -20,11 +20,7 @@ (define-module (guix scripts repl) #:use-module (guix ui) #:use-module (guix scripts) - #:use-module ((guix scripts build) #:select (%standard-build-options)) #:use-module (guix repl) - #:use-module (guix utils) - #:use-module (guix packages) - #:use-module (gnu packages) #:use-module (srfi srfi-1) #:use-module (srfi srfi-37) #:use-module (ice-9 match) @@ -58,9 +54,12 @@ (option '(#\q) #f #f (lambda (opt name arg result) (alist-cons 'ignore-dot-guile? #t result))) - (find (lambda (option) - (member "load-path" (option-names option))) - %standard-build-options))) + (option '(#\L "load-path") #t #f + (lambda (opt name arg result) + ;; XXX: Imperatively modify the search paths. + (set! %load-path (cons arg %load-path)) + (set! %load-compiled-path (cons arg %load-compiled-path)) + result)))) (define (show-help) |