nixpkgs/pkgs/development/compilers/sbcl/bootstrap.nix

80 lines
2.3 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, makeWrapper }:
2014-06-26 06:06:25 +01:00
let
options = rec {
2019-08-13 22:52:01 +01:00
x86_64-darwin = {
2019-04-14 16:33:40 +01:00
version = "1.2.11";
system = "x86-64-darwin";
2019-04-14 16:33:40 +01:00
sha256 = "0lh4gpvi8hl6g6b9321g5pwh8sk3218i7h4lx7p3vd9z0cf3lz85";
};
2019-08-13 22:52:01 +01:00
x86_64-linux = {
version = "1.3.16";
system = "x86-64-linux";
sha256 = "0sq2dylwwyqfwkbdvcgqwz3vay9v895zpb0fyzsiwy31d1x9pr2s";
};
2019-08-13 22:52:01 +01:00
i686-linux = {
version = "1.2.7";
system = "x86-linux";
sha256 = "07f3bz4br280qvn85i088vpzj9wcz8wmwrf665ypqx181pz2ai3j";
};
2019-08-13 22:52:01 +01:00
aarch64-linux = {
version = "1.3.16";
system = "arm64-linux";
sha256 = "0q1brz9c49xgdljzfx8rpxxnlwhadxkcy5kg0mcd9wnxygind1cl";
};
2019-08-13 22:52:01 +01:00
armv7l-linux = {
version = "1.2.14";
system = "armhf-linux";
sha256 = "0sp5445rbvms6qvzhld0kwwvydw51vq5iaf4kdqsf2d9jvaz3yx5";
};
armv6l-linux = armv7l-linux;
2019-08-13 22:52:01 +01: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 22:52:01 +01:00
x86_64-solaris = {
version = "1.2.7";
system = "x86-64-solaris";
sha256 = "05c12fmac4ha72k1ckl6i780rckd7jh4g5s5hiic7fjxnf1kx8d0";
};
};
cfg = options.${stdenv.hostPlatform.system};
in
assert builtins.hasAttr stdenv.hostPlatform.system options;
2014-06-26 06:06:25 +01:00
stdenv.mkDerivation rec {
pname = "sbcl-bootstrap";
version = cfg.version;
2014-06-26 06:06:25 +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
2014-07-22 10:01:32 +01:00
mkdir -p $out/share/sbcl
cp -p src/runtime/sbcl $out/share/sbcl
2014-06-26 06:06:25 +01:00
cp -p output/sbcl.core $out/share/sbcl
mkdir -p $out/bin
makeWrapper $out/share/sbcl/sbcl $out/bin/sbcl \
--add-flags "--core $out/share/sbcl/sbcl.core"
'';
postFixup = stdenv.lib.optionalString (!stdenv.isAarch32 && stdenv.isLinux) ''
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";
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
};
}