2009-05-31 08:07:25 +02:00
|
|
|
a :
|
|
|
|
let
|
|
|
|
fetchurl = a.fetchurl;
|
|
|
|
|
2009-08-10 07:58:16 +02:00
|
|
|
version = a.lib.attrByPath ["version"] "1.0.29" a;
|
2009-05-31 08:07:25 +02:00
|
|
|
buildInputs = with a; [
|
|
|
|
clisp makeWrapper
|
|
|
|
];
|
|
|
|
in
|
|
|
|
rec {
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://prdownloads.sourceforge.net/sbcl/sbcl-${version}-source.tar.bz2";
|
2009-08-10 07:58:16 +02:00
|
|
|
sha256 = "1bdsn4rnrz289068f1bdnxyijs4r02if4p87fv726glp5wm20q1z";
|
2009-05-31 08:07:25 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
inherit buildInputs;
|
|
|
|
configureFlags = [];
|
|
|
|
|
|
|
|
/* doConfigure should be removed if not needed */
|
2009-06-03 09:07:01 +02:00
|
|
|
phaseNames = ["setVars" "doFixNewer" "doFixTests" "setVersion" "doBuild" "doInstall" "doWrap"];
|
2009-05-31 08:07:25 +02:00
|
|
|
|
2009-08-10 09:14:28 +02:00
|
|
|
goSrcDir = ''
|
|
|
|
cd sbcl-${version}/
|
|
|
|
'';
|
|
|
|
|
2009-05-31 08:07:25 +02:00
|
|
|
setVars = a.fullDepEntry (''
|
|
|
|
export INSTALL_ROOT=$out
|
|
|
|
'') ["minInit"];
|
|
|
|
|
2009-06-03 09:07:01 +02:00
|
|
|
setVersion = a.fullDepEntry (''
|
|
|
|
echo '"${version}.nixos"' > version.lisp-expr
|
|
|
|
echo "
|
|
|
|
(lambda (features)
|
|
|
|
(flet ((enable (x)
|
|
|
|
(pushnew x features))
|
|
|
|
(disable (x)
|
|
|
|
(setf features (remove x features))))
|
|
|
|
(enable :sb-thread))) " > customize-target-features.lisp
|
|
|
|
'') ["minInit" "doUnpack"];
|
|
|
|
|
2009-07-07 16:50:37 +02:00
|
|
|
/* SBCL checks whether files are up-to-date in many places.. Unfortunately, same timestamp
|
|
|
|
is not good enought
|
|
|
|
*/
|
2009-06-03 09:07:01 +02:00
|
|
|
doFixNewer = a.fullDepEntry(''
|
2009-08-10 09:14:28 +02:00
|
|
|
|
2009-06-03 09:07:01 +02:00
|
|
|
sed -e 's@> x y@>= x y@' -i contrib/sb-aclrepl/repl.lisp
|
2009-07-07 16:50:37 +02:00
|
|
|
sed -e '/(date)/i((= date 2208988801) 2208988800)' -i contrib/asdf/asdf.lisp
|
|
|
|
sed -i src/cold/slam.lisp -e \
|
|
|
|
'/file-write-date input/a)'
|
|
|
|
sed -i src/cold/slam.lisp -e \
|
|
|
|
'/file-write-date output/i(or (and (= 2208988801 (file-write-date output)) (= 2208988801 (file-write-date input)))'
|
|
|
|
sed -i src/code/target-load.lisp -e \
|
|
|
|
'/date defaulted-fasl/a)'
|
|
|
|
sed -i src/code/target-load.lisp -e \
|
|
|
|
'/date defaulted-source/i(or (and (= 2208988801 (file-write-date defaulted-source-truename)) (= 2208988801 (file-write-date defaulted-fasl-truename)))'
|
2009-06-03 09:07:01 +02:00
|
|
|
'') ["minInit" "doUnpack"];
|
|
|
|
|
2009-05-31 08:07:25 +02:00
|
|
|
doWrap = a.fullDepEntry (''
|
|
|
|
wrapProgram "$out/bin/sbcl" --set "SBCL_HOME" "$out/lib/sbcl"
|
|
|
|
'') ["minInit" "addInputs"];
|
|
|
|
|
|
|
|
doFixTests = a.fullDepEntry (''
|
|
|
|
sed -e 's/"sys"/"wheel"/' -i contrib/sb-posix/posix-tests.lisp
|
|
|
|
'') ["minInit" "doUnpack"];
|
|
|
|
|
|
|
|
doBuild = a.fullDepEntry (''
|
|
|
|
sh make.sh clisp
|
|
|
|
'') ["minInit" "doUnpack" "addInputs"];
|
|
|
|
|
|
|
|
doInstall = a.fullDepEntry (''
|
|
|
|
sh install.sh
|
|
|
|
'') ["doBuild" "minInit" "addInputs"];
|
|
|
|
|
|
|
|
name = "sbcl-" + version;
|
|
|
|
meta = {
|
|
|
|
description = "Lisp compiler";
|
2009-07-07 17:05:15 +02:00
|
|
|
maintainers = [a.lib.maintainers.raskin];
|
2009-05-31 08:07:25 +02:00
|
|
|
};
|
|
|
|
}
|
2009-08-10 00:45:43 +02:00
|
|
|
|
2009-08-10 07:58:16 +02:00
|
|
|
|