2015-09-27 23:35:34 +02:00
|
|
|
{ stdenv, fetchurl, makeWrapper }:
|
2014-06-26 07:06:25 +02:00
|
|
|
|
2015-09-27 23:35:34 +02:00
|
|
|
let
|
|
|
|
options = rec {
|
|
|
|
x86_64-darwin = rec {
|
|
|
|
version = "1.1.8";
|
|
|
|
system = "x86-64-darwin";
|
|
|
|
sha256 = "006pr88053wclvbjfjdypnbiw8wymbzdzi7a6kbkpdfn4zf5943j";
|
|
|
|
};
|
|
|
|
x86_64-linux = rec {
|
|
|
|
version = "1.2.15";
|
|
|
|
system = "x86-64-linux";
|
|
|
|
sha256 = "1bpbfz9x2w73hy2kh8p0kd4m1p6pin90h2zycq52r3bbz8yv47aw";
|
|
|
|
};
|
|
|
|
i686-linux = rec {
|
|
|
|
version = "1.2.7";
|
|
|
|
system = "x86-linux";
|
|
|
|
sha256 = "07f3bz4br280qvn85i088vpzj9wcz8wmwrf665ypqx181pz2ai3j";
|
|
|
|
};
|
|
|
|
armv7l-linux = rec {
|
|
|
|
version = "1.2.14";
|
|
|
|
system = "armhf-linux";
|
|
|
|
sha256 = "0sp5445rbvms6qvzhld0kwwvydw51vq5iaf4kdqsf2d9jvaz3yx5";
|
|
|
|
};
|
|
|
|
armv6l-linux = armv7l-linux;
|
2016-01-01 17:59:35 +01:00
|
|
|
x86_64-solaris = x86_64-linux;
|
2015-11-24 11:59:39 +01:00
|
|
|
x86_64-freebsd = rec {
|
|
|
|
version = "1.2.7";
|
|
|
|
system = "x86-64-freebsd";
|
|
|
|
sha256 = "14k42xiqd2rrim4pd5k5pjcrpkac09qnpynha8j1v4jngrvmw7y6";
|
|
|
|
};
|
2015-09-27 23:35:34 +02:00
|
|
|
};
|
|
|
|
cfg = options.${stdenv.system};
|
|
|
|
in
|
2014-06-26 07:06:25 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "sbcl-bootstrap-${version}";
|
2015-09-27 23:35:34 +02:00
|
|
|
version = cfg.version;
|
2014-06-26 07:06:25 +02:00
|
|
|
|
2015-09-27 23:35:34 +02:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/project/sbcl/sbcl/${version}/sbcl-${version}-${cfg.system}-binary.tar.bz2";
|
|
|
|
sha256 = cfg.sha256;
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ makeWrapper ];
|
2014-06-26 07:06:25 +02:00
|
|
|
|
|
|
|
installPhase = ''
|
2014-07-22 11:01:32 +02:00
|
|
|
mkdir -p $out/bin
|
2014-06-26 07:06:25 +02:00
|
|
|
cp -p src/runtime/sbcl $out/bin
|
2015-10-01 19:43:44 +02:00
|
|
|
|
2014-07-22 11:01:32 +02:00
|
|
|
mkdir -p $out/share/sbcl
|
2015-09-27 23:35:34 +02:00
|
|
|
cp -p src/runtime/sbcl $out/share/sbcl
|
2014-06-26 07:06:25 +02:00
|
|
|
cp -p output/sbcl.core $out/share/sbcl
|
2015-09-27 23:35:34 +02:00
|
|
|
mkdir -p $out/bin
|
|
|
|
makeWrapper $out/share/sbcl/sbcl $out/bin/sbcl \
|
|
|
|
--add-flags "--core $out/share/sbcl/sbcl.core"
|
|
|
|
'';
|
|
|
|
|
2015-10-03 00:15:13 +02:00
|
|
|
postFixup = stdenv.lib.optionalString (!stdenv.isArm && stdenv.isLinux) ''
|
2015-09-27 23:35:34 +02:00
|
|
|
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $out/share/sbcl/sbcl
|
2014-06-26 07:06:25 +02:00
|
|
|
'';
|
|
|
|
|
2015-10-01 11:20:24 +02:00
|
|
|
meta = with stdenv.lib; {
|
2014-06-26 07:06:25 +02:00
|
|
|
description = "Lisp compiler";
|
|
|
|
homepage = "http://www.sbcl.org";
|
2015-10-01 11:20:24 +02:00
|
|
|
license = licenses.publicDomain; # and FreeBSD
|
2015-11-24 23:26:04 +01:00
|
|
|
maintainers = [maintainers.raskin maintainers.tohl];
|
2015-10-01 11:20:24 +02:00
|
|
|
platforms = attrNames options;
|
2014-06-26 07:06:25 +02:00
|
|
|
};
|
|
|
|
}
|