lispPackages: fix build
This commit is contained in:
parent
e292be76fc
commit
cd77f69ec8
3 changed files with 8 additions and 7 deletions
|
@ -15,6 +15,7 @@ stdenv.mkDerivation {
|
|||
chmod a+x "$out"/bin/*
|
||||
|
||||
substituteAll "${./setup-hook.sh}" "setup-hook-parsed"
|
||||
addEnvHooks(){ true; };
|
||||
source setup-hook-parsed
|
||||
setLisp "${lisp}"
|
||||
echo "$NIX_LISP"
|
||||
|
|
|
@ -9,7 +9,7 @@ addASDFPaths () {
|
|||
}
|
||||
|
||||
setLisp () {
|
||||
if [ -z "$NIX_LISP_COMMAND" ]; then
|
||||
if [ -z "${NIX_LISP_COMMAND:-}" ]; then
|
||||
for j in "$1"/bin/*; do
|
||||
case "$(basename "$j")" in
|
||||
sbcl) NIX_LISP_COMMAND="$j" ;;
|
||||
|
@ -20,7 +20,7 @@ setLisp () {
|
|||
esac
|
||||
done
|
||||
fi
|
||||
if [ -z "$NIX_LISP" ]; then
|
||||
if [ -n "${NIX_LISP_COMMAND:-}" ] && [ -z "${NIX_LISP:-}" ]; then
|
||||
NIX_LISP="${NIX_LISP_COMMAND##*/}"
|
||||
fi
|
||||
}
|
||||
|
@ -35,5 +35,5 @@ export NIX_LISP_COMMAND NIX_LISP CL_SOURCE_REGISTRY NIX_LISP_ASDF
|
|||
|
||||
addEnvHooks "$targetOffset" addASDFPaths setLisp collectNixLispLDLP
|
||||
|
||||
mkdir -p "$HOME"/.cache/common-lisp || HOME="$TMP/.temp-$USER-home"
|
||||
mkdir -p "$HOME"/.cache/common-lisp || HOME="$TMP/.temp-${USER:-nixbld}-home"
|
||||
mkdir -p "$HOME"/.cache/common-lisp
|
||||
|
|
|
@ -18,7 +18,7 @@ let
|
|||
touch "$path_config_script"
|
||||
chmod a+x "$config_script"
|
||||
chmod a+x "$path_config_script"
|
||||
echo "if test -z \"\''${_''${outhash}_NIX_LISP_CONFIG}\"; then export _''${outhash}_NIX_LISP_CONFIG=1; " >> "$config_script"
|
||||
echo "if test -z \"\''${_''${outhash}_NIX_LISP_CONFIG:-}\"; then export _''${outhash}_NIX_LISP_CONFIG=1; " >> "$config_script"
|
||||
echo "export NIX_CFLAGS_COMPILE='$NIX_CFLAGS_COMPILE'\"\''${NIX_CFLAGS_COMPILE:+ \$NIX_CFLAGS_COMPILE}\"" >> "$config_script"
|
||||
echo "export NIX_LDFLAGS='$NIX_LDFLAGS'\"\''${NIX_LDFLAGS:+ \$NIX_LDFLAGS}\"" >> "$config_script"
|
||||
echo "export NIX_LISP_COMMAND='$NIX_LISP_COMMAND'" >> "$config_script"
|
||||
|
@ -28,12 +28,12 @@ let
|
|||
echo "echo \"\$ASDF_OUTPUT_TRANSLATIONS\" | grep -E '(^|:)$store_translation(:|\$)' >/dev/null || export ASDF_OUTPUT_TRANSLATIONS=\"\''${ASDF_OUTPUT_TRANSLATIONS:+\$ASDF_OUTPUT_TRANSLATIONS:}\"'$store_translation'" >> "$config_script"
|
||||
echo "source '$path_config_script'" >> "$config_script"
|
||||
echo "fi" >> "$config_script"
|
||||
echo "if test -z \"\''${_''${outhash}_NIX_LISP_PATH_CONFIG}\"; then export _''${outhash}_NIX_LISP_PATH_CONFIG=1; " >> "$path_config_script"
|
||||
echo "export NIX_LISP_ASDF_PATHS=\"$( ( echo "\$NIX_LISP_ASDF_PATHS"; echo "$NIX_LISP_ASDF_PATHS"; echo "$out/lib/common-lisp/${args.baseName}" ) | grep . | sort | uniq)\"" >> "$path_config_script"
|
||||
echo "if test -z \"\''${_''${outhash}_NIX_LISP_PATH_CONFIG:-}\"; then export _''${outhash}_NIX_LISP_PATH_CONFIG=1; " >> "$path_config_script"
|
||||
echo "export NIX_LISP_ASDF_PATHS=\"$( ( echo "\''${NIX_LISP_ASDF_PATHS:-}"; echo "$NIX_LISP_ASDF_PATHS"; echo "$out/lib/common-lisp/${args.baseName}" ) | grep . | sort | uniq)\"" >> "$path_config_script"
|
||||
test -n "$LD_LIBRARY_PATH" &&
|
||||
echo "export LD_LIBRARY_PATH=\"\$LD_LIBRARY_PATH\''${LD_LIBRARY_PATH:+:}\"'$LD_LIBRARY_PATH'" >> "$path_config_script"
|
||||
test -n "$NIX_LISP_LD_LIBRARY_PATH" &&
|
||||
echo "export NIX_LISP_LD_LIBRARY_PATH=\"\$NIX_LISP_LD_LIBRARY_PATH\''${NIX_LISP_LD_LIBRARY_PATH:+:}\"'$(echo "$NIX_LISP_LD_LIBRARY_PATH" | tr -d '\n' | tr : '\n' | sort | uniq | tr '\n' ':' | sed -e 's/:$//')'" >> "$path_config_script"
|
||||
echo "export NIX_LISP_LD_LIBRARY_PATH=\"\''${NIX_LISP_LD_LIBRARY_PATH:-}\''${NIX_LISP_LD_LIBRARY_PATH:+:}\"'$(echo "$NIX_LISP_LD_LIBRARY_PATH" | tr -d '\n' | tr : '\n' | sort | uniq | tr '\n' ':' | sed -e 's/:$//')'" >> "$path_config_script"
|
||||
echo "fi" >> "$path_config_script"
|
||||
'';
|
||||
deployLaunchScript = ''
|
||||
|
|
Loading…
Reference in a new issue