fix(make-disk-image): support vmTools kernelModules with backward compatibility

This commit is contained in:
Ravi Arnan committed 2026-10-19 23:22:56 +08:00
1 parent 725ea35e41
commit 61c844e2c0
2 files changed
+33 -9

No files matched your search

+13
View File
@@ -646,6 +646,19 @@ let
*/
vmToolsSupportsCustomQemu = final_lib: lib.versionAtLeast final_lib.version "24.11.20240709";
/*
Checks whether vmTools supports the kernelModules argument.
Older nixpkgs versions only supported overriding `kernel` with an aggregated modules tree.
vmToolsSupportsKernelModules :: pkgs -> bool
*/
vmToolsSupportsKernelModules =
pkgs:
(pkgs.vmTools.override.__functionArgs or (
if lib.isFunction pkgs.vmTools.override then builtins.functionArgs pkgs.vmTools.override else { }
)
) ? kernelModules;
optionTypes = rec {
filename = lib.mkOptionType {
name = "filename";