From fa7bd53d0d002646870a18e202ac98b3ac0f598c Mon Sep 17 00:00:00 2001 From: Brad Jensen Date: Wed, 24 Jul 2019 09:21:04 -0700 Subject: Resolve symlinks before trying to recognize a lisp implementation The CCL package installs a symlink named "ccl" that points at the actual implementation executable: lx86cl64 (or lx86cl for 32 bit). When clwrapper is used with CCL as the backing implementation, this script fails to recognize the implementation. By resolving the symlink, we are able to recognize which implementation we're actually working with. --- pkgs/development/lisp-modules/clwrapper/cl-wrapper.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'pkgs/development') diff --git a/pkgs/development/lisp-modules/clwrapper/cl-wrapper.sh b/pkgs/development/lisp-modules/clwrapper/cl-wrapper.sh index 65fb6e615f5f..3b35d7ba5a95 100755 --- a/pkgs/development/lisp-modules/clwrapper/cl-wrapper.sh +++ b/pkgs/development/lisp-modules/clwrapper/cl-wrapper.sh @@ -8,7 +8,12 @@ eval "$NIX_LISP_PREHOOK" NIX_LISP_COMMAND="$1" shift -[ -z "$NIX_LISP" ] && NIX_LISP="${NIX_LISP_COMMAND##*/}" +if [ -z "$NIX_LISP" ]; then + while [ -h "${NIX_LISP_COMMAND}" ]; do + NIX_LISP_COMMAND="$(readlink -n "${NIX_LISP_COMMAND}")" + done + NIX_LISP="${NIX_LISP_COMMAND##*/}" +fi export NIX_LISP NIX_LISP_LOAD_FILE NIX_LISP_EXEC_CODE NIX_LISP_COMMAND NIX_LISP_FINAL_PARAMETERS -- cgit 1.4.1