linuxManualConfig: don't build inside source tree

We can avoid the need to explicitly exclude it later if we just put it
somewhere else to begin with.
This commit is contained in:
Alyssa Ross
2023-03-18 13:49:12 +00:00
parent c3e12e57c3
commit d75cff2ee3
@@ -156,8 +156,7 @@ let
configurePhase = ''
runHook preConfigure
mkdir build
export buildRoot="$(pwd)/build"
export buildRoot=$(mktemp -d)
echo "manual-config configurePhase buildRoot=$buildRoot pwd=$PWD"
@@ -275,8 +274,8 @@ let
mkdir -p $dev/lib/modules/${modDirVersion}/{build,source}
# To save space, exclude a bunch of unneeded stuff when copying.
(cd .. && rsync --archive --prune-empty-dirs \
--exclude='/build/' \
(cd "$NIX_BUILD_TOP" && cd "$sourceRoot" &&
rsync --archive --prune-empty-dirs \
* $dev/lib/modules/${modDirVersion}/source/)
cd $dev/lib/modules/${modDirVersion}/source