aboutsummaryrefslogtreecommitdiff
path: root/distro.scm
diff options
context:
space:
mode:
Diffstat (limited to 'distro.scm')
-rw-r--r--distro.scm11
1 files changed, 11 insertions, 0 deletions
diff --git a/distro.scm b/distro.scm
index f697ad3601..760c7245e7 100644
--- a/distro.scm
+++ b/distro.scm
@@ -24,6 +24,7 @@
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-39)
#:export (search-patch
+ search-bootstrap-binary
%patch-directory
find-packages-by-name))
@@ -41,10 +42,20 @@
(or (getenv "DISTRO_PATCH_DIRECTORY")
(compile-time-value (getenv "DISTRO_INSTALLED_PATCH_DIRECTORY")))))
+(define %bootstrap-binaries-directory
+ (make-parameter
+ (or (getenv "DISTRO_BOOTSTRAP_DIRECTORY")
+ (compile-time-value (getenv "DISTRO_INSTALLED_BOOTSTRAP_DIRECTORY")))))
+
(define (search-patch file-name)
"Search the patch FILE-NAME."
(search-path (list (%patch-directory)) file-name))
+(define (search-bootstrap-binary file-name system)
+ "Search the bootstrap binary FILE-NAME for SYSTEM."
+ (search-path (list (%bootstrap-binaries-directory))
+ (string-append system "/" file-name)))
+
(define %distro-module-directory
;; Absolute path of the (distro ...) module root.
(string-append (dirname (search-path %load-path "distro.scm"))