1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 06:31:14 +02:00

Make the default stdenv phases do the right thing

Fixes #11858.
This commit is contained in:
Eelco Dolstra 2024-11-12 20:42:53 +01:00
parent 14edb78d53
commit e6aae64318
4 changed files with 44 additions and 15 deletions

View file

@ -31,6 +31,35 @@ in {
# Make bash completion work.
XDG_DATA_DIRS+=:$out/share
# Make the default phases do the right thing.
# FIXME: this wouldn't be needed if the ninja package set buildPhase() instead of $buildPhase.
# FIXME: mesonConfigurePhase shouldn't cd to the build directory. It would be better to pass '-C <dir>' to ninja.
cdToBuildDir() {
if [[ ! -e build.ninja ]]; then
cd build
fi
}
configurePhase() {
mesonConfigurePhase
}
buildPhase() {
cdToBuildDir
ninjaBuildPhase
}
checkPhase() {
cdToBuildDir
mesonCheckPhase
}
installPhase() {
cdToBuildDir
ninjaInstallPhase
}
'';
# We use this shell with the local checkout, not unpackPhase.