~ chicken-core (chicken-5) 5c2abc1374b7077af90163328aebfdfb6b86cb67
commit 5c2abc1374b7077af90163328aebfdfb6b86cb67
Author: Mario Domenech Goulart <mario@parenteses.org>
AuthorDate: Sun May 26 18:29:33 2019 +0200
Commit: Evan Hanson <evhan@foldling.org>
CommitDate: Wed Jun 26 18:38:33 2019 +1200
Make chicken-home consider CHICKEN_INSTALL_PREFIX
Some eggs (e.g. spock) may rely on chicken-home to install files and
load code.
This change makes chicken-home take CHICKEN_INSTALL_PREFIX into account,
so that eggs get properly installed and executed by salmonella.
Signed-off-by: Evan Hanson <evhan@foldling.org>
diff --git a/library.scm b/library.scm
index b7d0c10e..13fd9afb 100644
--- a/library.scm
+++ b/library.scm
@@ -6416,7 +6416,10 @@ static C_word C_fcall C_setenv(C_word x, C_word y) {
(define-foreign-variable installation-home c-string "C_INSTALL_SHARE_HOME")
(define-foreign-variable install-egg-home c-string "C_INSTALL_EGG_HOME")
-(define (chicken-home) installation-home)
+(define (chicken-home)
+ (or (and-let* ((prefix (get-environment-variable "CHICKEN_INSTALL_PREFIX")))
+ (string-append prefix "/share"))
+ installation-home))
(define path-list-separator
(if ##sys#windows-platform #\; #\:))
Trap