2014-11-27 22:48:07 +00:00
|
|
|
{ stdenv, fetchsvn, gcc, glibc, m4 }:
|
|
|
|
|
|
|
|
/* TODO: there are also MacOS, FreeBSD and Windows versions */
|
|
|
|
assert stdenv.system == "x86_64-linux" || stdenv.system == "i686-linux";
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "ccl-${version}";
|
|
|
|
version = "1.10";
|
|
|
|
revision = "16313";
|
|
|
|
|
|
|
|
src = fetchsvn {
|
|
|
|
url = http://svn.clozure.com/publicsvn/openmcl/release/1.10/linuxx86/ccl;
|
|
|
|
rev = revision;
|
|
|
|
sha256 = "11lmdvzj1mbm7mbr22vjbcrsvinyz8n32a91ms324xqdqpr82ifb";
|
2010-02-24 09:04:29 +00:00
|
|
|
};
|
|
|
|
|
2014-11-27 22:48:07 +00:00
|
|
|
buildInputs = [ gcc glibc m4 ];
|
|
|
|
|
|
|
|
CCL_RUNTIME = if stdenv.system == "x86_64-linux" then "lx86cl64" else "lx86cl";
|
|
|
|
CCL_KERNEL = if stdenv.system == "x86_64-linux" then "linuxx8664" else "linuxx8632";
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
sed -i lisp-kernel/${CCL_KERNEL}/Makefile -e's/svnversion/echo ${revision}/g'
|
2010-02-24 09:04:29 +00:00
|
|
|
|
2014-11-27 22:48:07 +00:00
|
|
|
make -C lisp-kernel/${CCL_KERNEL} clean
|
|
|
|
make -C lisp-kernel/${CCL_KERNEL} all
|
|
|
|
|
|
|
|
./${CCL_RUNTIME} -n -b -e '(ccl:rebuild-ccl :full t)' -e '(ccl:quit)'
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p "$out/share"
|
2014-11-27 22:48:07 +00:00
|
|
|
cp -r . "$out/share/ccl-installation"
|
2010-02-24 09:04:29 +00:00
|
|
|
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p "$out/bin"
|
2014-11-27 22:48:07 +00:00
|
|
|
echo -e '#!/bin/sh\n'"$out/share/ccl-installation/${CCL_RUNTIME}"' "$@"\n' > "$out"/bin/"${CCL_RUNTIME}"
|
|
|
|
chmod a+x "$out"/bin/"${CCL_RUNTIME}"
|
|
|
|
'';
|
|
|
|
|
2010-02-24 09:04:29 +00:00
|
|
|
meta = {
|
|
|
|
description = "Clozure Common Lisp";
|
2014-11-27 22:48:07 +00:00
|
|
|
homepage = http://ccl.clozure.com/;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ raskin muflax ];
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
license = stdenv.lib.licenses.lgpl21;
|
2010-02-24 09:04:29 +00:00
|
|
|
};
|
|
|
|
}
|