base: Handle multi-directories in load-path.

* src/cuirass/base.scm (set-guix-package-path!): Parse colon separated
directories in load-path.

Co-authored-by: Mathieu Lirzin <mthl@gnu.org>
improve-build-parallelism
Mathieu Othacehe 2017-02-02 10:13:13 +01:00 committed by Mathieu Lirzin
parent f695c79eb3
commit aebad5184d
No known key found for this signature in database
GPG Key ID: 0ADEE10094604D37
1 changed files with 10 additions and 5 deletions

View File

@ -193,8 +193,13 @@ if required. Return the last commit ID on success, #f otherwise."
(define (set-guix-package-path! path)
"Use PATH to find custom packages not defined in (gnu packages ...)
namespace or not already present in current Guile load paths."
(%package-module-path (cons path (%package-module-path)))
(%patch-path (cons path (%patch-path)))
(set! %load-path (cons path %load-path))
(set! %load-compiled-path (cons path %load-compiled-path)))
namespace or not already present in current Guile load paths. PATH is
expected to be a colon-separated string of directories."
(define (set-paths! dir)
(%package-module-path (cons dir (%package-module-path)))
(%patch-path (cons dir (%patch-path)))
(set! %load-path (cons dir %load-path))
(set! %load-compiled-path (cons dir %load-compiled-path)))
(let ((dirs (parse-path path)))
(for-each set-paths! dirs)))