batman_adv: prepend kernel.makeFlags to makeFLags

This commit is contained in:
Nick Cao 2022-02-10 09:40:50 +08:00
parent 07b06a7274
commit 8d715c1f78
No known key found for this signature in database
GPG key ID: 068A56CEF48FA2C1

View file

@ -12,11 +12,13 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = kernel.moduleBuildDependencies;
makeFlags = kernel.makeFlags ++ [
"KERNELPATH=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
];
hardeningDisable = [ "pic" ];
preBuild = ''
makeFlags="KERNELPATH=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
sed -i -e "s,INSTALL_MOD_DIR=,INSTALL_MOD_PATH=$out INSTALL_MOD_DIR=," \
-e /depmod/d Makefile
'';