>From 33f797de9276e9899d41b468f8905f63df944319 Mon Sep 17 00:00:00 2001 From: Mario Domenech Goulart Date: Sun, 26 May 2019 18:29:33 +0200 Subject: [PATCH] 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. --- library.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/library.scm b/library.scm index 3716fe52..48b56867 100644 --- a/library.scm +++ b/library.scm @@ -6417,7 +6417,12 @@ 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 + (if ##sys#windows-platform "\\" "/") + "share")) + installation-home)) (define path-list-separator (if ##sys#windows-platform #\; #\:)) -- 2.11.0