2023-10-24 04:06:05 +00:00
|
|
|
{ lib, stdenv, fetchurl, makeWrapper, cfg }:
|
2014-06-26 05:06:25 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "sbcl-bootstrap";
|
2023-10-24 04:06:05 +00:00
|
|
|
inherit (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";
|
2023-10-24 04:06:05 +00:00
|
|
|
inherit (cfg) sha256;
|
2015-09-27 21:35:34 +00:00
|
|
|
};
|
|
|
|
|
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.hostPlatform.isAarch32 && stdenv.hostPlatform.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
|
|
|
'';
|
2024-02-25 17:23:58 +00:00
|
|
|
|
|
|
|
meta.sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
|
2014-06-26 05:06:25 +00:00
|
|
|
}
|