v4l2loopback: prepend kernel.makeFlags to makeFlags and some cleanup

This commit is contained in:
Nick Cao 2022-02-10 10:46:46 +08:00
parent d3943a84af
commit 0b302ffa47
No known key found for this signature in database
GPG Key ID: 068A56CEF48FA2C1

View File

@ -16,12 +16,9 @@ stdenv.mkDerivation rec {
preBuild = ''
substituteInPlace Makefile --replace "modules_install" "INSTALL_MOD_PATH=$out modules_install"
sed -i '/depmod/d' Makefile
export PATH=${kmod}/sbin:$PATH
'';
nativeBuildInputs = kernel.moduleBuildDependencies;
buildInputs = [ kmod ];
nativeBuildInputs = [ kmod ] ++ kernel.moduleBuildDependencies;
postInstall = ''
make install-utils PREFIX=$bin
@ -29,7 +26,7 @@ stdenv.mkDerivation rec {
outputs = [ "out" "bin" ];
makeFlags = [
makeFlags = kernel.makeFlags ++ [
"KERNELRELEASE=${kernel.modDirVersion}"
"KERNEL_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
];