treewide: fix mismatched runHook invocations in Phase

mivorasu c6b15e1d 3557543e

Changed files
+55 -37
pkgs
applications
editors
jetbrains
source
jupyter-kernels
xeus-cling
by-name
bo
bobcat
cc
cc1541
db
dbip-city-lite
dbip-country-lite
dh
dhcpdump
di
discord-sh
du
duckstation
ed
edmarketconnector
he
hello-wayland
li
libblocksruntime
mo
mongoose
qu
quiet
ra
raylib-games
si
simple64
sw
switchres
development
compilers
factor-lang
tools
build-managers
bazel
bazel_5
bazel_6
bazel_7
+2 -2
pkgs/applications/editors/jetbrains/source/build.nix
···
patches = [ ../patches/kotlinc-path.patch ];
postPatch = "sed -i 's|KOTLIN_PATH_HERE|${kotlin'}|' src/main/java/org/jetbrains/jpsBootstrap/KotlinCompiler.kt";
buildPhase = ''
-
runHook preInstall
ant -Duser.home=${jpsRepo} -Dbuild.dir=/build/out -f jps-bootstrap-classpath.xml
-
runHook postInstall
'';
installPhase = ''
runHook preInstall
···
patches = [ ../patches/kotlinc-path.patch ];
postPatch = "sed -i 's|KOTLIN_PATH_HERE|${kotlin'}|' src/main/java/org/jetbrains/jpsBootstrap/KotlinCompiler.kt";
buildPhase = ''
+
runHook preBuild
ant -Duser.home=${jpsRepo} -Dbuild.dir=/build/out -f jps-bootstrap-classpath.xml
+
runHook postBuild
'';
installPhase = ''
runHook preInstall
+2 -2
pkgs/applications/editors/jupyter-kernels/xeus-cling/default.nix
···
doInstallCheck = true;
installCheckPhase = ''
-
runHook preCheck
# Smoke check: run a test notebook using Papermill by creating a simple kernelspec
mkdir -p kernels/cpp17
···
exit 1
fi
-
runHook postCheck
'';
passthru = (oldAttrs.passthru or { }) // {
···
doInstallCheck = true;
installCheckPhase = ''
+
runHook preInstallCheck
# Smoke check: run a test notebook using Papermill by creating a simple kernelspec
mkdir -p kernels/cpp17
···
exit 1
fi
+
runHook postInstallCheck
'';
passthru = (oldAttrs.passthru or { }) // {
+2 -2
pkgs/by-name/bo/bobcat/package.nix
···
'';
installPhase = ''
-
runHook preBuild
./build install x
-
runHook postBuild
'';
meta = with lib; {
···
'';
installPhase = ''
+
runHook preInstall
./build install x
+
runHook postInstall
'';
meta = with lib; {
+3 -1
pkgs/by-name/cc/cc1541/package.nix
···
doInstallCheck = true;
-
installCheckPhase = ''
runHook preCheck
make test
runHook postCheck
'';
···
doInstallCheck = true;
+
checkPhase = ''
runHook preCheck
+
make test
+
runHook postCheck
'';
+2 -2
pkgs/by-name/db/dbip-city-lite/package.nix
···
dontUnpack = true;
installPhase = ''
-
runHook preBuild
gzip -c -d "$src" > dbip-city-lite.mmdb
install -Dm444 dbip-city-lite.mmdb "$out/share/dbip/dbip-city-lite.mmdb"
-
runHook postBuild
'';
passthru.mmdb = "${finalAttrs.finalPackage}/share/dbip/dbip-city-lite.mmdb";
···
dontUnpack = true;
installPhase = ''
+
runHook preInstall
gzip -c -d "$src" > dbip-city-lite.mmdb
install -Dm444 dbip-city-lite.mmdb "$out/share/dbip/dbip-city-lite.mmdb"
+
runHook postInstall
'';
passthru.mmdb = "${finalAttrs.finalPackage}/share/dbip/dbip-city-lite.mmdb";
+2 -2
pkgs/by-name/db/dbip-country-lite/package.nix
···
dontUnpack = true;
installPhase = ''
-
runHook preBuild
gzip -c -d "$src" > dbip-country-lite.mmdb
install -Dm444 dbip-country-lite.mmdb "$out/share/dbip/dbip-country-lite.mmdb"
-
runHook postBuild
'';
passthru.mmdb = "${finalAttrs.finalPackage}/share/dbip/dbip-country-lite.mmdb";
···
dontUnpack = true;
installPhase = ''
+
runHook preInstall
gzip -c -d "$src" > dbip-country-lite.mmdb
install -Dm444 dbip-country-lite.mmdb "$out/share/dbip/dbip-country-lite.mmdb"
+
runHook postInstall
'';
passthru.mmdb = "${finalAttrs.finalPackage}/share/dbip/dbip-country-lite.mmdb";
+2 -2
pkgs/by-name/dh/dhcpdump/package.nix
···
];
installPhase = ''
-
runHook preBuild
install -Dm555 dhcpdump "$out/bin/dhcpdump"
installManPage dhcpdump.8
-
runHook postBuild
'';
meta = {
···
];
installPhase = ''
+
runHook preInstall
install -Dm555 dhcpdump "$out/bin/dhcpdump"
installManPage dhcpdump.8
+
runHook postInstall
'';
meta = {
+4 -2
pkgs/by-name/di/discord-sh/package.nix
···
doInstallCheck = true;
installCheckPhase = ''
-
runHook preCheck
$out/bin/discord.sh --help
-
runHook postCheck
'';
installPhase = ''
···
doInstallCheck = true;
installCheckPhase = ''
+
runHook preInstallCheck
+
$out/bin/discord.sh --help
+
+
runHook postInstallCheck
'';
installPhase = ''
+2 -2
pkgs/by-name/du/duckstation/package.nix
···
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isAarch64 "-flax-vector-conversions";
installCheckPhase = ''
-
runHook preCheck
$out/share/duckstation/common-tests
-
runHook postCheck
'';
installPhase = ''
···
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isAarch64 "-flax-vector-conversions";
installCheckPhase = ''
+
runHook preInstallCheck
$out/share/duckstation/common-tests
+
runHook postInstallCheck
'';
installPhase = ''
+2 -2
pkgs/by-name/ed/edmarketconnector/package.nix
···
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
-
runHook preInstallPhase
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
···
makeWrapper ${pythonEnv}/bin/python $out/bin/edmarketconnector \
--add-flags "${finalAttrs.src}/EDMarketConnector.py $@"
-
runHook postInstallPhase
'';
meta = {
···
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
+
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
···
makeWrapper ${pythonEnv}/bin/python $out/bin/edmarketconnector \
--add-flags "${finalAttrs.src}/EDMarketConnector.py $@"
+
runHook postInstall
'';
meta = {
+2 -2
pkgs/by-name/he/hello-wayland/package.nix
···
];
installPhase = ''
-
runHook preBuild
mkdir -p $out/bin
install hello-wayland $out/bin
-
runHook postBuild
'';
passthru.updateScript = unstableGitUpdater { };
···
];
installPhase = ''
+
runHook preInstall
mkdir -p $out/bin
install hello-wayland $out/bin
+
runHook postInstall
'';
passthru.updateScript = unstableGitUpdater { };
+1 -1
pkgs/by-name/li/libblocksruntime/package.nix
···
checkPhase = ''
runHook preCheck
./checktests
-
runHook postChck
'';
doCheck = false; # hasdescriptor.c test fails, hrm.
···
checkPhase = ''
runHook preCheck
./checktests
+
runHook postCheck
'';
doCheck = false; # hasdescriptor.c test fails, hrm.
+2 -2
pkgs/by-name/mo/mongoose/package.nix
···
];
buildPhase = ''
-
runHook preConfigure
for f in SuiteSparse_config Mongoose; do
(cd $f && cmakeConfigurePhase && make -j$NIX_BUILD_CORES)
done
-
runHook postConfigure
'';
installPhase = ''
···
];
buildPhase = ''
+
runHook preBuild
for f in SuiteSparse_config Mongoose; do
(cd $f && cmakeConfigurePhase && make -j$NIX_BUILD_CORES)
done
+
runHook postBuild
'';
installPhase = ''
+2 -2
pkgs/by-name/qu/quiet/package.nix
···
'';
installPhase = ''
-
runHook preInstallPhase
mkdir -p $out/{Applications,bin}
mv Quiet.app $out/Applications
makeWrapper $out/Applications/Quiet.app/Contents/MacOS/Quiet $out/bin/${pname}
-
runHook postInstallPhase
'';
meta = meta // {
···
'';
installPhase = ''
+
runHook preInstall
mkdir -p $out/{Applications,bin}
mv Quiet.app $out/Applications
makeWrapper $out/Applications/Quiet.app/Contents/MacOS/Quiet $out/bin/${pname}
+
runHook postInstall
'';
meta = meta // {
+2 -2
pkgs/by-name/ra/raylib-games/package.nix
···
'';
installPhase = ''
-
runHook preBuild
mkdir -p $out/bin $out/resources
find . -type f -executable -exec cp {} $out/bin \;
for d in *; do
···
cp -ar "$d/src/resources" "$out/resources/$d"
fi
done
-
runHook postBuild
'';
meta = with lib; {
···
'';
installPhase = ''
+
runHook preInstall
mkdir -p $out/bin $out/resources
find . -type f -executable -exec cp {} $out/bin \;
for d in *; do
···
cp -ar "$d/src/resources" "$out/resources/$d"
fi
done
+
runHook postInstall
'';
meta = with lib; {
+2 -2
pkgs/by-name/si/simple64/package.nix
···
dontUseCmakeConfigure = true;
buildPhase = ''
-
runHook preInstall
sh build.sh
-
runHook postInstall
'';
installPhase = ''
···
dontUseCmakeConfigure = true;
buildPhase = ''
+
runHook preBuild
sh build.sh
+
runHook postBuild
'';
installPhase = ''
+2 -2
pkgs/by-name/sw/switchres/package.nix
···
];
patchPhase = ''
-
runHook preHook
substituteInPlace ./custom_video_xrandr.cpp \
--replace-fail libX11.so ${xorg.libX11}/lib/libX11.so \
···
substituteInPlace ./custom_video_drmkms.cpp \
--replace-fail libdrm.so ${libdrm}/lib/libdrm.so \
-
runHook postHook
'';
env = {
···
];
patchPhase = ''
+
runHook prePatch
substituteInPlace ./custom_video_xrandr.cpp \
--replace-fail libX11.so ${xorg.libX11}/lib/libX11.so \
···
substituteInPlace ./custom_video_drmkms.cpp \
--replace-fail libdrm.so ${libdrm}/lib/libdrm.so \
+
runHook postPatch
'';
env = {
+4 -2
pkgs/development/compilers/factor-lang/wrapper.nix
···
"io.sockets.secure.unix"
];
installCheckPhase = ''
-
runHook preCheck
export HOME=$TMPDIR
$out/bin/factor -e='USING: tools.test tools.test.private
zealot.factor sequences namespaces formatting ;
···
"compiler" suffix
[ test-vocab ] each :test-failures
test-failures get length "Number of failed tests: %d\n" printf'
-
runHook postCheck
'';
passthru = {
···
"io.sockets.secure.unix"
];
installCheckPhase = ''
+
runHook preInstallCheck
+
export HOME=$TMPDIR
$out/bin/factor -e='USING: tools.test tools.test.private
zealot.factor sequences namespaces formatting ;
···
"compiler" suffix
[ test-vocab ] each :test-failures
test-failures get length "Number of failed tests: %d\n" printf'
+
+
runHook postInstallCheck
'';
passthru = {
+5 -1
pkgs/development/tools/build-managers/bazel/bazel_5/default.nix
···
installShellCompletion --fish \
--name bazel.fish \
./bazel_src/output/bazel-complete.fish
'';
# Install check fails on `aarch64-darwin`
# https://github.com/NixOS/nixpkgs/issues/145587
doInstallCheck = stdenv.hostPlatform.system != "aarch64-darwin";
installCheckPhase = ''
export TEST_TMPDIR=$(pwd)
hello_test () {
···
# second call succeeds because it defers to $out/bin/bazel-{version}-{os_arch}
hello_test
-
runHook postInstall
'';
# Save paths to hardcoded dependencies so Nix can detect them.
···
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 () {
···
# second call succeeds because it defers to $out/bin/bazel-{version}-{os_arch}
hello_test
+
runHook postInstallCheck
'';
# Save paths to hardcoded dependencies so Nix can detect them.
+5 -1
pkgs/development/tools/build-managers/bazel/bazel_6/default.nix
···
installShellCompletion --fish \
--name bazel.fish \
./bazel_src/output/bazel-complete.fish
'';
# Install check fails on `aarch64-darwin`
# https://github.com/NixOS/nixpkgs/issues/145587
doInstallCheck = stdenv.hostPlatform.system != "aarch64-darwin";
installCheckPhase = ''
export TEST_TMPDIR=$(pwd)
hello_test () {
···
exit 1
fi
-
runHook postInstall
'';
# Save paths to hardcoded dependencies so Nix can detect them.
···
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 () {
···
exit 1
fi
+
runHook postInstallCheck
'';
# Save paths to hardcoded dependencies so Nix can detect them.
+5 -1
pkgs/development/tools/build-managers/bazel/bazel_7/default.nix
···
installShellCompletion --fish \
--name bazel.fish \
./bazel_src/output/bazel-complete.fish
'';
installCheckPhase = ''
export TEST_TMPDIR=$(pwd)
hello_test () {
···
exit 1
fi
-
runHook postInstall
'';
# Save paths to hardcoded dependencies so Nix can detect them.
···
installShellCompletion --fish \
--name bazel.fish \
./bazel_src/output/bazel-complete.fish
+
+
runHook postInstall
'';
installCheckPhase = ''
+
runHook preInstallCheck
+
export TEST_TMPDIR=$(pwd)
hello_test () {
···
exit 1
fi
+
runHook postInstallCheck
'';
# Save paths to hardcoded dependencies so Nix can detect them.