2015-09-27 22:35:34 +01:00
|
|
|
{ stdenv, fetchurl, makeWrapper }:
|
2014-06-26 06:06:25 +01:00
|
|
|
|
2015-09-27 22:35:34 +01:00
|
|
|
let
|
|
|
|
options = rec {
|
|
|
|
x86_64-darwin = rec {
|
|
|
|
version = "1.1.8";
|
|
|
|
system = "x86-64-darwin";
|
|
|
|
sha256 = "006pr88053wclvbjfjdypnbiw8wymbzdzi7a6kbkpdfn4zf5943j";
|
|
|
|
};
|
|
|
|
x86_64-linux = rec {
|
2017-04-20 22:30:56 +01:00
|
|
|
version = "1.3.16";
|
2015-09-27 22:35:34 +01:00
|
|
|
system = "x86-64-linux";
|
2017-04-20 22:30:56 +01:00
|
|
|
sha256 = "0sq2dylwwyqfwkbdvcgqwz3vay9v895zpb0fyzsiwy31d1x9pr2s";
|
2015-09-27 22:35:34 +01:00
|
|
|
};
|
|
|
|
i686-linux = rec {
|
|
|
|
version = "1.2.7";
|
|
|
|
system = "x86-linux";
|
|
|
|
sha256 = "07f3bz4br280qvn85i088vpzj9wcz8wmwrf665ypqx181pz2ai3j";
|
|
|
|
};
|
2017-04-20 22:33:00 +01:00
|
|
|
aarch64-linux = rec {
|
|
|
|
version = "1.3.16";
|
|
|
|
system = "arm64-linux";
|
|
|
|
sha256 = "0q1brz9c49xgdljzfx8rpxxnlwhadxkcy5kg0mcd9wnxygind1cl";
|
|
|
|
};
|
2015-09-27 22:35:34 +01:00
|
|
|
armv7l-linux = rec {
|
|
|
|
version = "1.2.14";
|
|
|
|
system = "armhf-linux";
|
|
|
|
sha256 = "0sp5445rbvms6qvzhld0kwwvydw51vq5iaf4kdqsf2d9jvaz3yx5";
|
|
|
|
};
|
|
|
|
armv6l-linux = armv7l-linux;
|
2015-11-24 10:59:39 +00:00
|
|
|
x86_64-freebsd = rec {
|
|
|
|
version = "1.2.7";
|
|
|
|
system = "x86-64-freebsd";
|
|
|
|
sha256 = "14k42xiqd2rrim4pd5k5pjcrpkac09qnpynha8j1v4jngrvmw7y6";
|
|
|
|
};
|
2016-12-04 13:26:16 +00:00
|
|
|
x86_64-solaris = rec {
|
|
|
|
version = "1.2.7";
|
|
|
|
system = "x86-64-solaris";
|
|
|
|
sha256 = "05c12fmac4ha72k1ckl6i780rckd7jh4g5s5hiic7fjxnf1kx8d0";
|
|
|
|
};
|
2015-09-27 22:35:34 +01:00
|
|
|
};
|
|
|
|
cfg = options.${stdenv.system};
|
|
|
|
in
|
2016-11-30 06:59:49 +00:00
|
|
|
assert builtins.hasAttr stdenv.system options;
|
2014-06-26 06:06:25 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "sbcl-bootstrap-${version}";
|
2015-09-27 22:35:34 +01:00
|
|
|
version = cfg.version;
|
2014-06-26 06:06:25 +01:00
|
|
|
|
2015-09-27 22:35:34 +01: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 06:06:25 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
2014-07-22 10:01:32 +01:00
|
|
|
mkdir -p $out/bin
|
2014-06-26 06:06:25 +01:00
|
|
|
cp -p src/runtime/sbcl $out/bin
|
2015-10-01 18:43:44 +01:00
|
|
|
|
2014-07-22 10:01:32 +01:00
|
|
|
mkdir -p $out/share/sbcl
|
2015-09-27 22:35:34 +01:00
|
|
|
cp -p src/runtime/sbcl $out/share/sbcl
|
2014-06-26 06:06:25 +01:00
|
|
|
cp -p output/sbcl.core $out/share/sbcl
|
2015-09-27 22:35:34 +01:00
|
|
|
mkdir -p $out/bin
|
|
|
|
makeWrapper $out/share/sbcl/sbcl $out/bin/sbcl \
|
|
|
|
--add-flags "--core $out/share/sbcl/sbcl.core"
|
|
|
|
'';
|
|
|
|
|
2015-10-02 23:15:13 +01:00
|
|
|
postFixup = stdenv.lib.optionalString (!stdenv.isArm && stdenv.isLinux) ''
|
2015-09-27 22:35:34 +01:00
|
|
|
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $out/share/sbcl/sbcl
|
2014-06-26 06:06:25 +01:00
|
|
|
'';
|
|
|
|
|
2015-10-01 10:20:24 +01:00
|
|
|
meta = with stdenv.lib; {
|
2014-06-26 06:06:25 +01:00
|
|
|
description = "Lisp compiler";
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = http://www.sbcl.org;
|
2015-10-01 10:20:24 +01:00
|
|
|
license = licenses.publicDomain; # and FreeBSD
|
2015-11-24 22:26:04 +00:00
|
|
|
maintainers = [maintainers.raskin maintainers.tohl];
|
2015-10-01 10:20:24 +01:00
|
|
|
platforms = attrNames options;
|
2014-06-26 06:06:25 +01:00
|
|
|
};
|
|
|
|
}
|