gn: run hooks in build phases
Signed-off-by: Marcin Serwin <marcin@serwin.dev>
This commit is contained in:
@@ -43,6 +43,8 @@ stdenv.mkDerivation {
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
configurePhase = ''
|
||||
runHook preConfigure
|
||||
|
||||
python build/gen.py --no-last-commit-position
|
||||
cat > out/last_commit_position.h << EOF
|
||||
#ifndef OUT_LAST_COMMIT_POSITION_H_
|
||||
@@ -53,14 +55,24 @@ stdenv.mkDerivation {
|
||||
|
||||
#endif // OUT_LAST_COMMIT_POSITION_H_
|
||||
EOF
|
||||
|
||||
runHook postConfigure
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
ninja -j $NIX_BUILD_CORES -C out gn
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -vD out/gn "$out/bin/gn"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
Reference in New Issue
Block a user