mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
fix nix hooks & patch phase
This commit is contained in:
committed by
Christoffer Lerno
parent
7b649314ec
commit
5ed1281451
@@ -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; {
|
||||
|
||||
Reference in New Issue
Block a user