diff options
author | Mathieu Othacehe <m.othacehe@gmail.com> | 2017-02-02 10:13:13 +0100 |
---|---|---|
committer | Mathieu Lirzin <mthl@gnu.org> | 2017-02-06 12:47:36 +0100 |
commit | aebad5184ddf75cb6e34331f4fd6325d0221b5a6 (patch) | |
tree | 5f42d79152ed20584fb47362f3b472668fcdebdc | |
parent | f695c79eb3b93a0432901844c8ede16de39b8d07 (diff) | |
download | cuirass-aebad5184ddf75cb6e34331f4fd6325d0221b5a6.tar cuirass-aebad5184ddf75cb6e34331f4fd6325d0221b5a6.tar.gz |
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>
-rw-r--r-- | src/cuirass/base.scm | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/cuirass/base.scm b/src/cuirass/base.scm index 21f53e0..9062ebf 100644 --- a/src/cuirass/base.scm +++ b/src/cuirass/base.scm @@ -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))) |