File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535 export HOME="$TMPDIR/home"
3636 export XDG_DATA_HOME="$HOME/.local/share"
3737 mkdir -p "$HOME"
38+ runtime_root="$XDG_DATA_HOME/autolith/runtimes/${ pkgs . sbcl . version } "
39+ mkdir -p "$runtime_root"
3840 autolith --version >/dev/null
41+ test ! -e "$runtime_root/command"
42+ printf '%s\n' /managed/sbcl > "$runtime_root/command"
3943 test "$(autolith --version)" = "autolith ${ autolith . autolithSystem . version } "
44+ test "$(cat "$runtime_root/command")" = /managed/sbcl
45+ printf '%s\n' \
46+ "${ autolith . runtime } /bin/sbcl" > "$runtime_root/command"
47+ autolith --version >/dev/null
48+ test ! -e "$runtime_root/command"
4049
4150 export COLORLISP_NATIVE_LIBRARY="${ autolith . colorlispNativeLibrary } /lib/libcolorlisp-tree-sitter.so"
4251 "${ autolith . runtime } /bin/sbcl" \
Original file line number Diff line number Diff line change @@ -339,7 +339,17 @@ pkgs.writeShellApplication {
339339 printf '%s %s\n' \
340340 "${ expectedSbclVersion } " \
341341 "${ expectedSbclSourceHash } " > "$runtime_root/source.identity"
342- printf '%s\n' "${ runtime } /bin/sbcl" > "$runtime_root/command"
342+ # The Nix runtime needs companion libraries and environment from this
343+ # wrapper. Its bare persisted SBCL path would poison source-based tooling.
344+ recorded_runtime=
345+ if [ -r "$runtime_root/command" ]; then
346+ IFS= read -r recorded_runtime < "$runtime_root/command" || recorded_runtime=
347+ fi
348+ case "$recorded_runtime" in
349+ /nix/store/*-sbcl-with-packages*/bin/sbcl)
350+ rm -f "$runtime_root/command"
351+ ;;
352+ esac
343353
344354 recovery_core="$data_home/autolith/recovery/autolith-recovery.core"
345355 active_core="$data_home/autolith/active/autolith-active.core"
You can’t perform that action at this time.
0 commit comments