quicklispPackages: update to fresh QuickLisp
lispPackages: reduce environment-bombing
This commit is contained in:
@@ -49,7 +49,7 @@ NIX_LISP_ASDF_REGISTRY_CODE="
|
||||
)
|
||||
"
|
||||
|
||||
NIX_LISP_ASDF="${NIX_LISP_ASDF:-@asdf@}"
|
||||
NIX_LISP_ASDF="${NIX_LISP_ASDF:-@out@}"
|
||||
|
||||
nix_lisp_run_single_form(){
|
||||
NIX_LISP_FINAL_PARAMETERS=("$NIX_LISP_EXEC_CODE" "$1"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#! /bin/sh
|
||||
|
||||
source "@out@"/bin/cl-wrapper.sh "${NIX_LISP_COMMAND:-$(ls "@lisp@/bin"/* | head -n 1)}" "$@"
|
||||
source "@out@"/bin/cl-wrapper.sh "${NIX_LISP_COMMAND:-$(@ls@ "@lisp@/bin"/* | @head@ -n 1)}" "$@"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{stdenv, fetchurl, asdf, lisp ? null}:
|
||||
{stdenv, fetchurl, asdf, which, lisp ? null}:
|
||||
stdenv.mkDerivation {
|
||||
name = "cl-wrapper-script";
|
||||
|
||||
@@ -6,6 +6,8 @@ stdenv.mkDerivation {
|
||||
|
||||
installPhase=''
|
||||
mkdir -p "$out"/bin
|
||||
export head="$(which head)"
|
||||
export ls="$(which ls)"
|
||||
substituteAll ${./common-lisp.sh} "$out"/bin/common-lisp.sh
|
||||
substituteAll "${./build-with-lisp.sh}" "$out/bin/build-with-lisp.sh"
|
||||
substituteAll "${./cl-wrapper.sh}" "$out/bin/cl-wrapper.sh"
|
||||
@@ -16,17 +18,20 @@ stdenv.mkDerivation {
|
||||
setLisp "${lisp}"
|
||||
echo "$NIX_LISP"
|
||||
|
||||
ASDF_OUTPUT_TRANSLATIONS="${asdf}/lib/common-lisp/:$out/lib/common-lisp-compiled/" \
|
||||
mkdir -p "$out/lib/common-lisp/"
|
||||
cp -r "${asdf}/lib/common-lisp"/* "$out/lib/common-lisp/"
|
||||
chmod u+rw -R "$out/lib/common-lisp/"
|
||||
|
||||
NIX_LISP_PRELAUNCH_HOOK='nix_lisp_run_single_form "(progn
|
||||
(uiop/lisp-build:compile-file* \"${asdf}/lib/common-lisp/asdf/build/asdf.lisp\")
|
||||
(uiop/lisp-build:compile-file* \"'"$out"'/lib/common-lisp/asdf/build/asdf.lisp\")
|
||||
(asdf:load-system :uiop :force :all)
|
||||
(asdf:load-system :asdf :force :all)
|
||||
)"' \
|
||||
"$out/bin/common-lisp.sh" "$NIX_LISP"
|
||||
|
||||
ln -s "$out/lib/common-lisp-compiled"/{asdf/uiop,uiop}
|
||||
"$out/bin/common-lisp.sh"
|
||||
'';
|
||||
|
||||
buildInputs = [which];
|
||||
|
||||
inherit asdf lisp;
|
||||
stdenv_shell = stdenv.shell;
|
||||
|
||||
@@ -34,10 +39,10 @@ stdenv.mkDerivation {
|
||||
|
||||
phases="installPhase fixupPhase";
|
||||
|
||||
preferLocalBuild = true;
|
||||
ASDF_OUTPUT_TRANSLATIONS="${builtins.storeDir}/:${builtins.storeDir}";
|
||||
|
||||
passthru = {
|
||||
inherit lisp asdf;
|
||||
inherit lisp;
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -1,16 +1,10 @@
|
||||
NIX_LISP_ASDF="@asdf@"
|
||||
NIX_LISP_ASDF="@out@"
|
||||
|
||||
CL_SOURCE_REGISTRY="${CL_SOURCE_REGISTRY:+$CL_SOURCE_REGISTRY:}@asdf@/lib/common-lisp/asdf/:@asdf@/lib/common-lisp/asdf/uiop/"
|
||||
ASDF_OUTPUT_TRANSLATIONS="@asdf@/lib/common-lisp/:@out@/lib/common-lisp-compiled/"
|
||||
CL_SOURCE_REGISTRY="${CL_SOURCE_REGISTRY:+$CL_SOURCE_REGISTRY:}@out@/lib/common-lisp/asdf/"
|
||||
|
||||
addASDFPaths () {
|
||||
for j in "$1"/lib/common-lisp/*; do
|
||||
if [ -d "$j" ]; then
|
||||
CL_SOURCE_REGISTRY="$j/:$CL_SOURCE_REGISTRY"
|
||||
if [ -d "$(dirname "$(dirname "$j")")/common-lisp-compiled/$(basename "$j")" ]; then
|
||||
ASDF_OUTPUT_TRANSLATIONS="$j:$(dirname "$(dirname "$j")")/common-lisp-compiled/$(basename "$j")${ASDF_OUTPUT_TRANSLATIONS:+:}$ASDF_OUTPUT_TRANSLATIONS"
|
||||
fi
|
||||
fi
|
||||
for j in "$1"/lib/common-lisp-settings/*-path-config.sh; do
|
||||
source "$j"
|
||||
done
|
||||
}
|
||||
|
||||
@@ -35,7 +29,7 @@ collectNixLispLDLP () {
|
||||
fi
|
||||
}
|
||||
|
||||
export NIX_LISP_COMMAND NIX_LISP CL_SOURCE_REGISTRY NIX_LISP_ASDF ASDF_OUTPUT_TRANSLATIONS
|
||||
export NIX_LISP_COMMAND NIX_LISP CL_SOURCE_REGISTRY NIX_LISP_ASDF
|
||||
|
||||
envHooks+=(addASDFPaths setLisp collectNixLispLDLP)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user