clwrapper, buildLispPackage: compile fasls and store them for all systems
This commit is contained in:
@@ -10,6 +10,15 @@ stdenv.mkDerivation {
|
||||
substituteAll "${./build-with-lisp.sh}" "$out/bin/build-with-lisp.sh"
|
||||
substituteAll "${./cl-wrapper.sh}" "$out/bin/cl-wrapper.sh"
|
||||
chmod a+x "$out"/bin/*
|
||||
|
||||
substituteAll "${./setup-hook.sh}" "setup-hook-parsed"
|
||||
source setup-hook-parsed
|
||||
setLisp "${lisp}"
|
||||
echo "$NIX_LISP"
|
||||
|
||||
ASDF_OUTPUT_TRANSLATIONS="${asdf}/lib/common-lisp/:$out/lib/common-lisp-compiled/" \
|
||||
NIX_LISP_PRELAUNCH_HOOK='nix_lisp_run_single_form "(uiop/lisp-build:compile-file* \"${asdf}/lib/common-lisp/asdf/build/asdf.lisp\")"' \
|
||||
"$out/bin/common-lisp.sh" "$NIX_LISP"
|
||||
'';
|
||||
|
||||
inherit asdf lisp;
|
||||
@@ -22,7 +31,7 @@ stdenv.mkDerivation {
|
||||
preferLocalBuild = true;
|
||||
|
||||
passthru = {
|
||||
inherit lisp;
|
||||
inherit lisp asdf;
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
NIX_LISP_ASDF="@asdf@"
|
||||
|
||||
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/"
|
||||
|
||||
addASDFPaths () {
|
||||
for j in "$1"/lib/common-lisp/*; do
|
||||
if [ -d "$j" ]; then
|
||||
CL_SOURCE_REGISTRY="$CL_SOURCE_REGISTRY:$j/"
|
||||
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
|
||||
done
|
||||
}
|
||||
@@ -31,7 +35,7 @@ collectNixLispLDLP () {
|
||||
fi
|
||||
}
|
||||
|
||||
export NIX_LISP_COMMAND NIX_LISP CL_SOURCE_REGISTRY NIX_LISP_ASDF
|
||||
export NIX_LISP_COMMAND NIX_LISP CL_SOURCE_REGISTRY NIX_LISP_ASDF ASDF_OUTPUT_TRANSLATIONS
|
||||
|
||||
envHooks+=(addASDFPaths setLisp collectNixLispLDLP)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user