guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

05/07: repl: Avoid dependency on high-level package modules.


From: guix-commits
Subject: 05/07: repl: Avoid dependency on high-level package modules.
Date: Sun, 19 Jan 2020 17:12:12 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 358f66a004bc232aca1c51d04776a2ae0c1fbc9a
Author: Ludovic Courtès <address@hidden>
AuthorDate: Sun Jan 19 22:01:33 2020 +0100

    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.
---
 guix/scripts/repl.scm | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/guix/scripts/repl.scm b/guix/scripts/repl.scm
index a9268da..ff1f208 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]