2021-01-22 11:25:31 +00:00
|
|
|
{ lib, stdenv, fetchurl, makeWrapper }:
|
2014-06-26 05:06:25 +00:00
|
|
|
|
2015-09-27 21:35:34 +00:00
|
|
|
let
|
|
|
|
options = rec {
|
2021-03-14 16:51:57 +00:00
|
|
|
aarch64-darwin = {
|
|
|
|
version = "2.1.2";
|
|
|
|
system = "arm64-darwin";
|
|
|
|
sha256 = "sha256-H0ALigXcWIypdA+fTf7jERscwbb7QIAfcoxCtGDh0RU=";
|
|
|
|
};
|
2019-08-13 21:52:01 +00:00
|
|
|
x86_64-darwin = {
|
2022-10-01 07:12:51 +00:00
|
|
|
version = "2.2.9";
|
2015-09-27 21:35:34 +00:00
|
|
|
system = "x86-64-darwin";
|
2022-10-01 07:12:51 +00:00
|
|
|
sha256 = "sha256-b1BLkoLIOELAYBYA9eBmMgm1OxMxJewzNP96C9ADfKY=";
|
2015-09-27 21:35:34 +00:00
|
|
|
};
|
2019-08-13 21:52:01 +00:00
|
|
|
x86_64-linux = {
|
2017-04-20 21:30:56 +00:00
|
|
|
version = "1.3.16";
|
2015-09-27 21:35:34 +00:00
|
|
|
system = "x86-64-linux";
|
2017-04-20 21:30:56 +00:00
|
|
|
sha256 = "0sq2dylwwyqfwkbdvcgqwz3vay9v895zpb0fyzsiwy31d1x9pr2s";
|
2015-09-27 21:35:34 +00:00
|
|
|
};
|
2019-08-13 21:52:01 +00:00
|
|
|
i686-linux = {
|
2015-09-27 21:35:34 +00:00
|
|
|
version = "1.2.7";
|
|
|
|
system = "x86-linux";
|
|
|
|
sha256 = "07f3bz4br280qvn85i088vpzj9wcz8wmwrf665ypqx181pz2ai3j";
|
|
|
|
};
|
2019-08-13 21:52:01 +00:00
|
|
|
aarch64-linux = {
|
2017-04-20 21:33:00 +00:00
|
|
|
version = "1.3.16";
|
|
|
|
system = "arm64-linux";
|
|
|
|
sha256 = "0q1brz9c49xgdljzfx8rpxxnlwhadxkcy5kg0mcd9wnxygind1cl";
|
|
|
|
};
|
2019-08-13 21:52:01 +00:00
|
|
|
armv7l-linux = {
|
2015-09-27 21:35:34 +00:00
|
|
|
version = "1.2.14";
|
|
|
|
system = "armhf-linux";
|
|
|
|
sha256 = "0sp5445rbvms6qvzhld0kwwvydw51vq5iaf4kdqsf2d9jvaz3yx5";
|
|
|
|
};
|
|
|
|
armv6l-linux = armv7l-linux;
|
2019-08-13 21:52:01 +00:00
|
|
|
x86_64-freebsd = {
|
2015-11-24 10:59:39 +00:00
|
|
|
version = "1.2.7";
|
|
|
|
system = "x86-64-freebsd";
|
|
|
|
sha256 = "14k42xiqd2rrim4pd5k5pjcrpkac09qnpynha8j1v4jngrvmw7y6";
|
|
|
|
};
|
2019-08-13 21:52:01 +00:00
|
|
|
x86_64-solaris = {
|
2016-12-04 13:26:16 +00:00
|
|
|
version = "1.2.7";
|
|
|
|
system = "x86-64-solaris";
|
|
|
|
sha256 = "05c12fmac4ha72k1ckl6i780rckd7jh4g5s5hiic7fjxnf1kx8d0";
|
|
|
|
};
|
2015-09-27 21:35:34 +00:00
|
|
|
};
|
2018-08-20 19:11:29 +00:00
|
|
|
cfg = options.${stdenv.hostPlatform.system};
|
2015-09-27 21:35:34 +00:00
|
|
|
in
|
2018-08-20 19:11:29 +00:00
|
|
|
assert builtins.hasAttr stdenv.hostPlatform.system options;
|
2014-06-26 05:06:25 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "sbcl-bootstrap";
|
2015-09-27 21:35:34 +00:00
|
|
|
version = cfg.version;
|
2014-06-26 05:06:25 +00:00
|
|
|
|
2015-09-27 21:35:34 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/project/sbcl/sbcl/${version}/sbcl-${version}-${cfg.system}-binary.tar.bz2";
|
|
|
|
sha256 = cfg.sha256;
|
|
|
|
};
|
|
|
|
|
2021-02-07 09:17:39 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2014-06-26 05:06:25 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2014-07-22 09:01:32 +00:00
|
|
|
mkdir -p $out/bin
|
2014-06-26 05:06:25 +00:00
|
|
|
cp -p src/runtime/sbcl $out/bin
|
2015-10-01 17:43:44 +00:00
|
|
|
|
2014-07-22 09:01:32 +00:00
|
|
|
mkdir -p $out/share/sbcl
|
2015-09-27 21:35:34 +00:00
|
|
|
cp -p src/runtime/sbcl $out/share/sbcl
|
2014-06-26 05:06:25 +00:00
|
|
|
cp -p output/sbcl.core $out/share/sbcl
|
2015-09-27 21:35:34 +00:00
|
|
|
mkdir -p $out/bin
|
|
|
|
makeWrapper $out/share/sbcl/sbcl $out/bin/sbcl \
|
|
|
|
--add-flags "--core $out/share/sbcl/sbcl.core"
|
|
|
|
'';
|
|
|
|
|
2021-01-22 11:25:31 +00:00
|
|
|
postFixup = lib.optionalString (!stdenv.isAarch32 && stdenv.isLinux) ''
|
2015-09-27 21:35:34 +00:00
|
|
|
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $out/share/sbcl/sbcl
|
2014-06-26 05:06:25 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-22 11:25:31 +00:00
|
|
|
meta = with lib; {
|
2014-06-26 05:06:25 +00:00
|
|
|
description = "Lisp compiler";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://www.sbcl.org";
|
2015-10-01 09:20:24 +00:00
|
|
|
license = licenses.publicDomain; # and FreeBSD
|
2023-04-05 17:26:22 +00:00
|
|
|
maintainers = lib.teams.lisp.members;
|
2015-10-01 09:20:24 +00:00
|
|
|
platforms = attrNames options;
|
2014-06-26 05:06:25 +00:00
|
|
|
};
|
|
|
|
}
|