treewide: fix mismatched runHook invocations in Phase

This commit is contained in:
mivorasu 2025-07-28 04:12:58 +00:00
parent 3557543efc
commit c6b15e1db9
21 changed files with 55 additions and 37 deletions

View File

@ -162,11 +162,11 @@ let
patches = [ ../patches/kotlinc-path.patch ];
postPatch = "sed -i 's|KOTLIN_PATH_HERE|${kotlin'}|' src/main/java/org/jetbrains/jpsBootstrap/KotlinCompiler.kt";
buildPhase = ''
runHook preInstall
runHook preBuild
ant -Duser.home=${jpsRepo} -Dbuild.dir=/build/out -f jps-bootstrap-classpath.xml
runHook postInstall
runHook postBuild
'';
installPhase = ''
runHook preInstall

View File

@ -42,7 +42,7 @@ let
doInstallCheck = true;
installCheckPhase = ''
runHook preCheck
runHook preInstallCheck
# Smoke check: run a test notebook using Papermill by creating a simple kernelspec
mkdir -p kernels/cpp17
@ -61,7 +61,7 @@ let
exit 1
fi
runHook postCheck
runHook postInstallCheck
'';
passthru = (oldAttrs.passthru or { }) // {

View File

@ -57,11 +57,11 @@ stdenv.mkDerivation rec {
'';
installPhase = ''
runHook preBuild
runHook preInstall
./build install x
runHook postBuild
runHook postInstall
'';
meta = with lib; {

View File

@ -25,9 +25,11 @@ stdenv.mkDerivation (finalAttrs: {
doInstallCheck = true;
installCheckPhase = ''
checkPhase = ''
runHook preCheck
make test
runHook postCheck
'';

View File

@ -15,12 +15,12 @@ stdenvNoCC.mkDerivation (finalAttrs: {
dontUnpack = true;
installPhase = ''
runHook preBuild
runHook preInstall
gzip -c -d "$src" > dbip-city-lite.mmdb
install -Dm444 dbip-city-lite.mmdb "$out/share/dbip/dbip-city-lite.mmdb"
runHook postBuild
runHook postInstall
'';
passthru.mmdb = "${finalAttrs.finalPackage}/share/dbip/dbip-city-lite.mmdb";

View File

@ -15,12 +15,12 @@ stdenvNoCC.mkDerivation (finalAttrs: {
dontUnpack = true;
installPhase = ''
runHook preBuild
runHook preInstall
gzip -c -d "$src" > dbip-country-lite.mmdb
install -Dm444 dbip-country-lite.mmdb "$out/share/dbip/dbip-country-lite.mmdb"
runHook postBuild
runHook postInstall
'';
passthru.mmdb = "${finalAttrs.finalPackage}/share/dbip/dbip-country-lite.mmdb";

View File

@ -30,12 +30,12 @@ stdenv.mkDerivation rec {
];
installPhase = ''
runHook preBuild
runHook preInstall
install -Dm555 dhcpdump "$out/bin/dhcpdump"
installManPage dhcpdump.8
runHook postBuild
runHook postInstall
'';
meta = {

View File

@ -36,9 +36,11 @@ stdenvNoCC.mkDerivation rec {
doInstallCheck = true;
installCheckPhase = ''
runHook preCheck
runHook preInstallCheck
$out/bin/discord.sh --help
runHook postCheck
runHook postInstallCheck
'';
installPhase = ''

View File

@ -93,11 +93,11 @@ llvmPackages.stdenv.mkDerivation (finalAttrs: {
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isAarch64 "-flax-vector-conversions";
installCheckPhase = ''
runHook preCheck
runHook preInstallCheck
$out/share/duckstation/common-tests
runHook postCheck
runHook postInstallCheck
'';
installPhase = ''

View File

@ -36,7 +36,7 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstallPhase
runHook preInstall
mkdir -p $out/share/icons/hicolor/512x512/apps/
ln -s ${finalAttrs.src}/io.edcd.EDMarketConnector.png $out/share/icons/hicolor/512x512/apps/io.edcd.EDMarketConnector.png
@ -47,7 +47,7 @@ stdenv.mkDerivation (finalAttrs: {
makeWrapper ${pythonEnv}/bin/python $out/bin/edmarketconnector \
--add-flags "${finalAttrs.src}/EDMarketConnector.py $@"
runHook postInstallPhase
runHook postInstall
'';
meta = {

View File

@ -34,10 +34,10 @@ stdenv.mkDerivation {
];
installPhase = ''
runHook preBuild
runHook preInstall
mkdir -p $out/bin
install hello-wayland $out/bin
runHook postBuild
runHook postInstall
'';
passthru.updateScript = unstableGitUpdater { };

View File

@ -32,7 +32,7 @@ stdenv.mkDerivation {
checkPhase = ''
runHook preCheck
./checktests
runHook postChck
runHook postCheck
'';
doCheck = false; # hasdescriptor.c test fails, hrm.

View File

@ -46,13 +46,13 @@ stdenv.mkDerivation {
];
buildPhase = ''
runHook preConfigure
runHook preBuild
for f in SuiteSparse_config Mongoose; do
(cd $f && cmakeConfigurePhase && make -j$NIX_BUILD_CORES)
done
runHook postConfigure
runHook postBuild
'';
installPhase = ''

View File

@ -56,13 +56,13 @@ let
'';
installPhase = ''
runHook preInstallPhase
runHook preInstall
mkdir -p $out/{Applications,bin}
mv Quiet.app $out/Applications
makeWrapper $out/Applications/Quiet.app/Contents/MacOS/Quiet $out/bin/${pname}
runHook postInstallPhase
runHook postInstall
'';
meta = meta // {

View File

@ -41,7 +41,7 @@ stdenv.mkDerivation {
'';
installPhase = ''
runHook preBuild
runHook preInstall
mkdir -p $out/bin $out/resources
find . -type f -executable -exec cp {} $out/bin \;
for d in *; do
@ -49,7 +49,7 @@ stdenv.mkDerivation {
cp -ar "$d/src/resources" "$out/resources/$d"
fi
done
runHook postBuild
runHook postInstall
'';
meta = with lib; {

View File

@ -72,11 +72,11 @@ stdenv.mkDerivation (finalAttrs: {
dontUseCmakeConfigure = true;
buildPhase = ''
runHook preInstall
runHook preBuild
sh build.sh
runHook postInstall
runHook postBuild
'';
installPhase = ''

View File

@ -31,7 +31,7 @@ stdenv.mkDerivation (finalAttrs: {
];
patchPhase = ''
runHook preHook
runHook prePatch
substituteInPlace ./custom_video_xrandr.cpp \
--replace-fail libX11.so ${xorg.libX11}/lib/libX11.so \
@ -40,7 +40,7 @@ stdenv.mkDerivation (finalAttrs: {
substituteInPlace ./custom_video_drmkms.cpp \
--replace-fail libdrm.so ${libdrm}/lib/libdrm.so \
runHook postHook
runHook postPatch
'';
env = {

View File

@ -153,7 +153,8 @@ stdenv.mkDerivation (finalAttrs: {
"io.sockets.secure.unix"
];
installCheckPhase = ''
runHook preCheck
runHook preInstallCheck
export HOME=$TMPDIR
$out/bin/factor -e='USING: tools.test tools.test.private
zealot.factor sequences namespaces formatting ;
@ -162,7 +163,8 @@ stdenv.mkDerivation (finalAttrs: {
"compiler" suffix
[ test-vocab ] each :test-failures
test-failures get length "Number of failed tests: %d\n" printf'
runHook postCheck
runHook postInstallCheck
'';
passthru = {

View File

@ -699,12 +699,16 @@ stdenv.mkDerivation rec {
installShellCompletion --fish \
--name bazel.fish \
./bazel_src/output/bazel-complete.fish
runHook postInstall
'';
# Install check fails on `aarch64-darwin`
# https://github.com/NixOS/nixpkgs/issues/145587
doInstallCheck = stdenv.hostPlatform.system != "aarch64-darwin";
installCheckPhase = ''
runHook preInstallCheck
export TEST_TMPDIR=$(pwd)
hello_test () {
@ -737,7 +741,7 @@ stdenv.mkDerivation rec {
# second call succeeds because it defers to $out/bin/bazel-{version}-{os_arch}
hello_test
runHook postInstall
runHook postInstallCheck
'';
# Save paths to hardcoded dependencies so Nix can detect them.

View File

@ -779,12 +779,16 @@ stdenv.mkDerivation rec {
installShellCompletion --fish \
--name bazel.fish \
./bazel_src/output/bazel-complete.fish
runHook postInstall
'';
# Install check fails on `aarch64-darwin`
# https://github.com/NixOS/nixpkgs/issues/145587
doInstallCheck = stdenv.hostPlatform.system != "aarch64-darwin";
installCheckPhase = ''
runHook preInstallCheck
export TEST_TMPDIR=$(pwd)
hello_test () {
@ -829,7 +833,7 @@ stdenv.mkDerivation rec {
exit 1
fi
runHook postInstall
runHook postInstallCheck
'';
# Save paths to hardcoded dependencies so Nix can detect them.

View File

@ -635,9 +635,13 @@ stdenv.mkDerivation rec {
installShellCompletion --fish \
--name bazel.fish \
./bazel_src/output/bazel-complete.fish
runHook postInstall
'';
installCheckPhase = ''
runHook preInstallCheck
export TEST_TMPDIR=$(pwd)
hello_test () {
@ -683,7 +687,7 @@ stdenv.mkDerivation rec {
exit 1
fi
runHook postInstall
runHook postInstallCheck
'';
# Save paths to hardcoded dependencies so Nix can detect them.