From 89d450493911948489d8334a0d815e8ff2b46c05 Mon Sep 17 00:00:00 2001 From: James Fleming Date: Wed, 17 Feb 2021 11:12:47 +0100 Subject: [PATCH] sbcl: Small fixes around the phase definitions - Remove some debugging output at the start of the `patchPhase` section, which appears to have outlived its value. - Rename `patchPhase` to `postPatch`, to avoid preventing people adding patches via the `patches` variable. - Add `preBuild` and `postBuild` run-hooks to the `buildPhase` section. - Add `preInstall` and `postInstall` run-hooks to the `installPhase` section. --- pkgs/development/compilers/sbcl/common.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/development/compilers/sbcl/common.nix b/pkgs/development/compilers/sbcl/common.nix index 2e162ed5a2e..fac39d6c2ce 100644 --- a/pkgs/development/compilers/sbcl/common.nix +++ b/pkgs/development/compilers/sbcl/common.nix @@ -22,11 +22,7 @@ stdenv.mkDerivation rec { buildInputs = [texinfo]; - patchPhase = '' - echo '"${version}.nixos"' > version.lisp-expr - - pwd - + postPatch = '' # SBCL checks whether files are up-to-date in many places.. # Unfortunately, same timestamp is not good enough sed -e 's@> x y@>= x y@' -i contrib/sb-aclrepl/repl.lisp @@ -81,16 +77,24 @@ stdenv.mkDerivation rec { optionals disableImmobileSpace [ "immobile-space" "immobile-code" "compact-instance-header" ]; buildPhase = '' + runHook preBuild + sh make.sh --prefix=$out --xc-host="${sbclBootstrapHost}" ${ lib.concatStringsSep " " (builtins.map (x: "--with-${x}") enableFeatures ++ builtins.map (x: "--without-${x}") disableFeatures) } (cd doc/manual ; make info) + + runHook postBuild ''; installPhase = '' + runHook preInstall + INSTALL_ROOT=$out sh install.sh + + runHook postInstall '' + lib.optionalString (!purgeNixReferences) '' cp -r src $out/lib/sbcl