Merge pull request #113390 from equill/sbcl_2_1_1_tweaks

sbcl: Small fixes around the phase definitions
This commit is contained in:
Michael Raskin 2021-02-25 10:02:12 +00:00 committed by GitHub
commit dcce5b98b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,11 +22,9 @@ stdenv.mkDerivation rec {
buildInputs = [texinfo]; buildInputs = [texinfo];
patchPhase = '' postPatch = ''
echo '"${version}.nixos"' > version.lisp-expr echo '"${version}.nixos"' > version.lisp-expr
pwd
# SBCL checks whether files are up-to-date in many places.. # SBCL checks whether files are up-to-date in many places..
# Unfortunately, same timestamp is not good enough # Unfortunately, same timestamp is not good enough
sed -e 's@> x y@>= x y@' -i contrib/sb-aclrepl/repl.lisp sed -e 's@> x y@>= x y@' -i contrib/sb-aclrepl/repl.lisp
@ -43,12 +41,6 @@ stdenv.mkDerivation rec {
# Fix the tests # Fix the tests
sed -e '5,$d' -i contrib/sb-bsd-sockets/tests.lisp sed -e '5,$d' -i contrib/sb-bsd-sockets/tests.lisp
sed -e '5,$d' -i contrib/sb-simple-streams/*test*.lisp sed -e '5,$d' -i contrib/sb-simple-streams/*test*.lisp
# Use whatever `cc` the stdenv provides
substituteInPlace src/runtime/Config.x86-64-darwin --replace gcc cc
substituteInPlace src/runtime/Config.x86-64-darwin \
--replace mmacosx-version-min=10.4 mmacosx-version-min=10.5
'' ''
+ (if purgeNixReferences + (if purgeNixReferences
then then
@ -81,16 +73,24 @@ stdenv.mkDerivation rec {
optionals disableImmobileSpace [ "immobile-space" "immobile-code" "compact-instance-header" ]; optionals disableImmobileSpace [ "immobile-space" "immobile-code" "compact-instance-header" ];
buildPhase = '' buildPhase = ''
runHook preBuild
sh make.sh --prefix=$out --xc-host="${sbclBootstrapHost}" ${ sh make.sh --prefix=$out --xc-host="${sbclBootstrapHost}" ${
lib.concatStringsSep " " lib.concatStringsSep " "
(builtins.map (x: "--with-${x}") enableFeatures ++ (builtins.map (x: "--with-${x}") enableFeatures ++
builtins.map (x: "--without-${x}") disableFeatures) builtins.map (x: "--without-${x}") disableFeatures)
} }
(cd doc/manual ; make info) (cd doc/manual ; make info)
runHook postBuild
''; '';
installPhase = '' installPhase = ''
runHook preInstall
INSTALL_ROOT=$out sh install.sh INSTALL_ROOT=$out sh install.sh
runHook postInstall
'' ''
+ lib.optionalString (!purgeNixReferences) '' + lib.optionalString (!purgeNixReferences) ''
cp -r src $out/lib/sbcl cp -r src $out/lib/sbcl