From 8bea1a2005c64a8c9c430d0dddb6b2e5db5f6f12 Mon Sep 17 00:00:00 2001 From: Mel Bourgeois Date: Fri, 1 Nov 2024 23:22:59 -0500 Subject: [PATCH] nixgl: forward override calls to wrapped package --- modules/misc/nixgl.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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" { };