From 0b3651bc9321c7292e0409384a8e9aaa82b1e057 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 25 Nov 2012 16:28:52 +0100 Subject: distro: Search bootstrap binaries and patches in %LOAD-PATH. * Makefile.am (patchdir, bootstrapdir): Change to be sub-directories of $(guilemoduledir). (.scm.go): Remove `DISTRO_' environment variables. * distro.scm (not-colon): Remove. (%patch-path, %bootstrap-binaries-path): Default to sub-directories of the entries in %LOAD-PATH. * pre-inst-env.in: Remove definition of `DISTRO_' environment variables. --- distro.scm | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'distro.scm') diff --git a/distro.scm b/distro.scm index 2d441f450b..f91b0ee96b 100644 --- a/distro.scm +++ b/distro.scm @@ -26,6 +26,7 @@ #:export (search-patch search-bootstrap-binary %patch-directory + %bootstrap-binaries-path fold-packages find-packages-by-name)) @@ -38,23 +39,21 @@ (define _ (cut gettext <> "guix")) -(define not-colon - ;; The char set that contains all the characters but `:'. - (char-set-complement (char-set #\:))) +;; By default, we store patches and bootstrap binaries alongside Guile +;; modules. This is so that these extra files can be found without +;; requiring a special setup, such as a specific installation directory +;; and an extra environment variable. One advantage of this setup is +;; that everything just works in an auto-compilation setting. (define %patch-path (make-parameter - (or (and=> (getenv "DISTRO_PATCH_PATH") - (cut string-tokenize <> not-colon)) - (compile-time-value - (list (getenv "DISTRO_INSTALLED_PATCH_DIRECTORY")))))) + (map (cut string-append <> "/distro/packages/patches") + %load-path))) (define %bootstrap-binaries-path (make-parameter - (or (and=> (getenv "DISTRO_BOOTSTRAP_PATH") - (cut string-tokenize <> not-colon)) - (compile-time-value - (list (getenv "DISTRO_INSTALLED_BOOTSTRAP_DIRECTORY")))))) + (map (cut string-append <> "/distro/packages/bootstrap") + %load-path))) (define (search-patch file-name) "Search the patch FILE-NAME." -- cgit v1.2.3