2023-11-16 04:20:00 +00:00
|
|
|
{ lib, stdenv, fetchurl, makeWrapper, cfg }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "sbcl-bootstrap";
|
2023-11-16 04:20:00 +00:00
|
|
|
inherit (cfg) version;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/project/sbcl/sbcl/${version}/sbcl-${version}-${cfg.system}-binary.tar.bz2";
|
2023-11-16 04:20:00 +00:00
|
|
|
inherit (cfg) sha256;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp -p src/runtime/sbcl $out/bin
|
|
|
|
|
|
|
|
mkdir -p $out/share/sbcl
|
|
|
|
cp -p src/runtime/sbcl $out/share/sbcl
|
|
|
|
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"
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
postFixup = lib.optionalString (!stdenv.isAarch32 && stdenv.isLinux) ''
|
2020-04-24 23:36:52 +00:00
|
|
|
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $out/share/sbcl/sbcl
|
|
|
|
'';
|
|
|
|
}
|