fix nix hooks & patch phase

This commit is contained in:
Book-reader
2025-10-15 23:42:37 +13:00
committed by Christoffer Lerno
parent 7b649314ec
commit 5ed1281451

View File

@@ -33,7 +33,7 @@ in llvmPackages.stdenv.mkDerivation (_:
# Here we substitute GIT_HASH which is not set for cmake in nix builds.
# Similar situation is with __DATE__ and __TIME__ macros, which are
# set to "Jan 01 1980 00:00:00" by default.
patchPhase = ''
postPatch = ''
substituteInPlace git_hash.cmake --replace-fail "\''${GIT_HASH}" "${rev}"
local FILE_NAMES="$(find src -type f)"
@@ -71,6 +71,7 @@ in llvmPackages.stdenv.mkDerivation (_:
# In check phase we preserve BUILD directory as
# we need to return to it before install phase
checkPhase = ''
runHook preCheck
local BUILD_DIR=$(pwd)
cd ../resources/testproject
@@ -80,6 +81,7 @@ in llvmPackages.stdenv.mkDerivation (_:
../build/c3c compile-run -O1 src/test_suite_runner.c3 -- ../build/c3c ./test_suite
cd $BUILD_DIR
runHook postCheck
'';
meta = with lib; {