diff --git a/modules/misc/nixgl.nix b/modules/misc/nixgl.nix index 2c7fcaff..54131472 100644 --- a/modules/misc/nixgl.nix +++ b/modules/misc/nixgl.nix @@ -240,7 +240,15 @@ in { shopt -u nullglob # Revert nullglob back to its normal default state ''; - })); + })) // { + # When the nixGL-wrapped package is given to a HM module, the module + # might want to override the package arguments, but our wrapper + # wouldn't know what to do with them. So, we rewrite the override + # function to instead forward the arguments to the package's own + # override function. + override = args: + makePackageWrapper vendor environment (pkg.override args); + }; wrappers = { mesa = makePackageWrapper "Intel" { };