From f232dc594f10b5337fc5ee2be60f54095a422b8c Mon Sep 17 00:00:00 2001 From: Hraban Luyat Date: Tue, 29 Apr 2025 01:41:39 -0400 Subject: [PATCH] sbcl: dont define pre/post in deriv Leave these blank for users to override if desired. --- pkgs/development/compilers/sbcl/default.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/development/compilers/sbcl/default.nix b/pkgs/development/compilers/sbcl/default.nix index ffc34f8f90d2..9973cc3fc7c6 100644 --- a/pkgs/development/compilers/sbcl/default.nix +++ b/pkgs/development/compilers/sbcl/default.nix @@ -9,6 +9,7 @@ strace, texinfo, which, + writableTmpDirAsHomeHook, writeText, zstd, version, @@ -97,6 +98,7 @@ stdenv.mkDerivation (self: { ++ lib.optionals self.doCheck ( [ which + writableTmpDirAsHomeHook ] ++ lib.optionals (builtins.elem stdenv.system strace.meta.platforms) [ strace @@ -171,7 +173,8 @@ stdenv.mkDerivation (self: { ./dynamic-space-size-envvar-2.5.2-feature.patch ./dynamic-space-size-envvar-2.5.2-tests.patch ]; - postPatch = + + sbclPatchPhase = lib.optionalString (self.disabledTestFiles != [ ]) '' (cd tests ; rm -f ${lib.concatStringsSep " " self.disabledTestFiles}) '' @@ -200,11 +203,7 @@ stdenv.mkDerivation (self: { fi ''; - preBuild = '' - export INSTALL_ROOT=$out - mkdir -p test-home - export HOME=$PWD/test-home - ''; + preConfigurePhases = "sbclPatchPhase"; enableFeatures = assert lib.assertMsg ( @@ -241,6 +240,7 @@ stdenv.mkDerivation (self: { buildPhase = '' runHook preBuild + export INSTALL_ROOT=$out sh make.sh ${lib.concatStringsSep " " self.buildArgs} (cd doc/manual ; make info) @@ -266,7 +266,7 @@ stdenv.mkDerivation (self: { '' runHook preInstall - INSTALL_ROOT=$out sh install.sh + sh install.sh '' + lib.optionalString (!self.purgeNixReferences) ''