r8168: prepend kernel.makeFlags to makeFlags

This commit is contained in:
Nick Cao 2022-02-10 13:27:42 +08:00
parent a0f82198c7
commit c0ed14933f
No known key found for this signature in database
GPG Key ID: 068A56CEF48FA2C1

View File

@ -27,11 +27,13 @@ in stdenv.mkDerivation rec {
# avoid using the Makefile directly -- it doesn't understand
# any kernel but the current.
# based on the ArchLinux pkgbuild: https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/r8168
makeFlags = kernel.makeFlags ++ [
"-C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
"M=$(PWD)/src"
"modules"
];
preBuild = ''
makeFlagsArray+=("-C${kernel.dev}/lib/modules/${kernel.modDirVersion}/build")
makeFlagsArray+=("M=$PWD/src")
makeFlagsArray+=("EXTRA_CFLAGS=-DCONFIG_R8168_NAPI -DCONFIG_R8168_VLAN -DCONFIG_ASPM -DENABLE_S5WOL -DENABLE_EEE")
makeFlagsArray+=("modules")
'';
enableParallelBuilding = true;