mbp2018-bridge-drv: pass makeFlags and moduleBuildDependencies from kernel

This commit is contained in:
Nick Cao 2022-02-10 10:24:57 +08:00
parent e1f487741f
commit 4315bccd6a
No known key found for this signature in database
GPG key ID: 068A56CEF48FA2C1

View file

@ -11,14 +11,17 @@ stdenv.mkDerivation rec {
sha256 = "sha256-o6yGiR+Y5SnX1johdi7fQWP5ts7HdDMqeju75UOhgik=";
};
nativeBuildInputs = kernel.moduleBuildDependencies;
makeFlags = kernel.makeFlags;
buildPhase = ''
make -C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build \
-j$NIX_BUILD_CORES M=$(pwd) modules
-j$NIX_BUILD_CORES M=$(pwd) modules $makeFlags
'';
installPhase = ''
make -C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build \
INSTALL_MOD_PATH=$out M=$(pwd) modules_install
INSTALL_MOD_PATH=$out M=$(pwd) modules_install $makeFlags
'';
meta = with lib; {