2021-01-22 12:25:31 +01:00
|
|
|
{ lib, stdenv, fetchurl, makeWrapper }:
|
2014-06-26 07:06:25 +02:00
|
|
|
|
2015-09-27 23:35:34 +02:00
|
|
|
let
|
|
|
|
options = rec {
|
2021-03-14 17:51:57 +01:00
|
|
|
aarch64-darwin = {
|
|
|
|
version = "2.1.2";
|
|
|
|
system = "arm64-darwin";
|
|
|
|
sha256 = "sha256-H0ALigXcWIypdA+fTf7jERscwbb7QIAfcoxCtGDh0RU=";
|
|
|
|
};
|
2019-08-13 23:52:01 +02:00
|
|
|
x86_64-darwin = {
|
2019-04-14 17:33:40 +02:00
|
|
|
version = "1.2.11";
|
2015-09-27 23:35:34 +02:00
|
|
|
system = "x86-64-darwin";
|
2019-04-14 17:33:40 +02:00
|
|
|
sha256 = "0lh4gpvi8hl6g6b9321g5pwh8sk3218i7h4lx7p3vd9z0cf3lz85";
|
2015-09-27 23:35:34 +02:00
|
|
|
};
|
2019-08-13 23:52:01 +02:00
|
|
|
x86_64-linux = {
|
2017-04-20 23:30:56 +02:00
|
|
|
version = "1.3.16";
|
2015-09-27 23:35:34 +02:00
|
|
|
system = "x86-64-linux";
|
2017-04-20 23:30:56 +02:00
|
|
|
sha256 = "0sq2dylwwyqfwkbdvcgqwz3vay9v895zpb0fyzsiwy31d1x9pr2s";
|
2015-09-27 23:35:34 +02:00
|
|
|
};
|
2019-08-13 23:52:01 +02:00
|
|
|
i686-linux = {
|
2015-09-27 23:35:34 +02:00
|
|
|
version = "1.2.7";
|
|
|
|
system = "x86-linux";
|
|
|
|
sha256 = "07f3bz4br280qvn85i088vpzj9wcz8wmwrf665ypqx181pz2ai3j";
|
|
|
|
};
|
2019-08-13 23:52:01 +02:00
|
|
|
aarch64-linux = {
|
2017-04-20 23:33:00 +02:00
|
|
|
version = "1.3.16";
|
|
|
|
system = "arm64-linux";
|
|
|
|
sha256 = "0q1brz9c49xgdljzfx8rpxxnlwhadxkcy5kg0mcd9wnxygind1cl";
|
|
|
|
};
|
2019-08-13 23:52:01 +02:00
|
|
|
armv7l-linux = {
|
2015-09-27 23:35:34 +02:00
|
|
|
version = "1.2.14";
|
|
|
|
system = "armhf-linux";
|
|
|
|
sha256 = "0sp5445rbvms6qvzhld0kwwvydw51vq5iaf4kdqsf2d9jvaz3yx5";
|
|
|
|
};
|
|
|
|
armv6l-linux = armv7l-linux;
|
2019-08-13 23:52:01 +02:00
|
|
|
x86_64-freebsd = {
|
2015-11-24 11:59:39 +01:00
|
|
|
version = "1.2.7";
|
|
|
|
system = "x86-64-freebsd";
|
|
|
|
sha256 = "14k42xiqd2rrim4pd5k5pjcrpkac09qnpynha8j1v4jngrvmw7y6";
|
|
|
|
};
|
2019-08-13 23:52:01 +02:00
|
|
|
x86_64-solaris = {
|
2016-12-04 14:26:16 +01:00
|
|
|
version = "1.2.7";
|
|
|
|
system = "x86-64-solaris";
|
|
|
|
sha256 = "05c12fmac4ha72k1ckl6i780rckd7jh4g5s5hiic7fjxnf1kx8d0";
|
|
|
|
};
|
2015-09-27 23:35:34 +02:00
|
|
|
};
|
2018-08-20 21:11:29 +02:00
|
|
|
cfg = options.${stdenv.hostPlatform.system};
|
2015-09-27 23:35:34 +02:00
|
|
|
in
|
2018-08-20 21:11:29 +02:00
|
|
|
assert builtins.hasAttr stdenv.hostPlatform.system options;
|
2014-06-26 07:06:25 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "sbcl-bootstrap";
|
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;
|
|
|
|
};
|
|
|
|
|
2021-02-07 10:17:39 +01:00
|
|
|
nativeBuildInputs = [ 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"
|
|
|
|
'';
|
|
|
|
|
2021-01-22 12:25:31 +01:00
|
|
|
postFixup = lib.optionalString (!stdenv.isAarch32 && 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
|
|
|
'';
|
|
|
|
|
2021-01-22 12:25:31 +01:00
|
|
|
meta = with lib; {
|
2014-06-26 07:06:25 +02:00
|
|
|
description = "Lisp compiler";
|
2020-04-01 03:11:51 +02:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|