linuxPackages.nvidia-x11: use makeFlags in builder.sh

This commit is contained in:
Bernardo Meurer 2021-08-30 16:41:23 -07:00
parent 4a8ab482e0
commit 19e4afc912
No known key found for this signature in database
GPG key ID: F4C0D53B8D14C246
2 changed files with 7 additions and 4 deletions

View file

@ -17,10 +17,8 @@ buildPhase() {
# Create the module.
echo "Building linux driver against kernel: $kernel";
cd kernel
sysSrc=$(echo $kernel/lib/modules/$kernelVersion/source)
sysOut=$(echo $kernel/lib/modules/$kernelVersion/build)
unset src # used by the nv makefile
make IGNORE_PREEMPT_RT_PRESENCE=1 NV_BUILD_SUPPORTS_HMM=1 SYSSRC=$sysSrc SYSOUT=$sysOut module -j$NIX_BUILD_CORES
make $makeFlags -j $NIX_BUILD_CORES module
cd ..
fi

View file

@ -75,7 +75,12 @@ let
kernel = if libsOnly then null else kernel.dev;
kernelVersion = if libsOnly then null else kernel.modDirVersion;
makeFlags = optionals (!libsOnly) kernel.makeFlags;
makeFlags = optionals (!libsOnly) (kernel.makeFlags ++ [
"IGNORE_PREEMPT_RT_PRESENCE=1"
"NV_BUILD_SUPPORTS_HMM=1"
"SYSSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source"
"SYSOUT=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
]);
hardeningDisable = [ "pic" "format" ];