2013-10-13 06:45:07 +00:00
|
|
|
{stdenv, fetchurl, asdf, lisp ? null}:
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "cl-wrapper-script";
|
|
|
|
|
|
|
|
buildPhase="";
|
|
|
|
|
|
|
|
installPhase=''
|
|
|
|
mkdir -p "$out"/bin
|
2016-03-25 09:34:51 +00:00
|
|
|
substituteAll ${./common-lisp.sh} "$out"/bin/common-lisp.sh
|
2014-11-14 12:28:54 +00:00
|
|
|
substituteAll "${./build-with-lisp.sh}" "$out/bin/build-with-lisp.sh"
|
2015-04-14 08:51:19 +00:00
|
|
|
substituteAll "${./cl-wrapper.sh}" "$out/bin/cl-wrapper.sh"
|
2013-10-13 06:45:07 +00:00
|
|
|
chmod a+x "$out"/bin/*
|
2017-03-31 20:46:32 +00:00
|
|
|
|
|
|
|
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"
|
2013-10-13 06:45:07 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
inherit asdf lisp;
|
2017-03-30 11:00:43 +00:00
|
|
|
stdenv_shell = stdenv.shell;
|
2013-10-13 06:45:07 +00:00
|
|
|
|
|
|
|
setupHook = ./setup-hook.sh;
|
|
|
|
|
|
|
|
phases="installPhase fixupPhase";
|
|
|
|
|
2014-02-10 20:03:17 +00:00
|
|
|
preferLocalBuild = true;
|
|
|
|
|
2013-10-13 06:45:07 +00:00
|
|
|
passthru = {
|
2017-03-31 20:46:32 +00:00
|
|
|
inherit lisp asdf;
|
2013-10-13 06:45:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = ''Script used to wrap Common Lisp implementations'';
|
|
|
|
maintainers = [stdenv.lib.maintainers.raskin];
|
|
|
|
};
|
|
|
|
}
|