mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 22:08:16 -05:00
self: Shrink the module search path of the 'guix' command.
Previously we'd have lots of useless entries on the search paths, such as libtasn1, libidn2, zlib, gmp, etc. because they are propagated by gnutls. * guix/self.scm (guix-command)[source-directories, object-directories]: New variables. Use them in the body of "guix-command". Filter their items with 'file-exists?'.
This commit is contained in:
parent
0de33cb364
commit
f2d0a2cf5c
1 changed files with 14 additions and 10 deletions
|
@ -367,22 +367,26 @@ (define* (guix-command modules #:optional compiled-modules
|
|||
guile (guile-version (effective-version)))
|
||||
"Return the 'guix' command such that it adds MODULES and DEPENDENCIES in its
|
||||
load path."
|
||||
(define source-directories
|
||||
(map (lambda (package)
|
||||
(file-append package "/share/guile/site/"
|
||||
guile-version))
|
||||
dependencies))
|
||||
|
||||
(define object-directories
|
||||
(map (lambda (package)
|
||||
(file-append package "/lib/guile/"
|
||||
guile-version "/site-ccache"))
|
||||
dependencies))
|
||||
|
||||
(program-file "guix-command"
|
||||
#~(begin
|
||||
(set! %load-path
|
||||
(append '#$(map (lambda (package)
|
||||
(file-append package
|
||||
"/share/guile/site/"
|
||||
guile-version))
|
||||
dependencies)
|
||||
(append (filter file-exists? '#$source-directories)
|
||||
%load-path))
|
||||
|
||||
(set! %load-compiled-path
|
||||
(append '#$(map (lambda (package)
|
||||
(file-append package "/lib/guile/"
|
||||
guile-version
|
||||
"/site-ccache"))
|
||||
dependencies)
|
||||
(append (filter file-exists? '#$object-directories)
|
||||
%load-compiled-path))
|
||||
|
||||
(set! %load-path (cons #$modules %load-path))
|
||||
|
|
Loading…
Reference in a new issue