linuxPackages.nvidia_x11: don't define kernel modules when building libs only

This commit is contained in:
ccicnce113424
2026-05-03 15:06:20 +08:00
parent a40cce218a
commit 1eb834a2e1
+11 -7
View File
@@ -246,13 +246,17 @@ stdenv.mkDerivation (finalAttrs: {
);
in
{
mod = callPackage ./kernel-modules.nix {
open = false;
nvidia_x11 = finalAttrs.finalPackage;
# build files already patched when building the main package, so no need to patch them again
patches = [ ];
inherit broken;
};
mod =
if !libsOnly then
callPackage ./kernel-modules.nix {
open = false;
nvidia_x11 = finalAttrs.finalPackage;
# build files already patched when building the main package, so no need to patch them again
patches = [ ];
inherit broken;
}
else
{ };
open = lib.mapNullable (
hash:
callPackage ./kernel-modules.nix {