Skip to content

Commit 1eb834a

Browse files
committed
linuxPackages.nvidia_x11: don't define kernel modules when building libs only
1 parent a40cce2 commit 1eb834a

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

pkgs/os-specific/linux/nvidia-x11/generic.nix

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -246,13 +246,17 @@ stdenv.mkDerivation (finalAttrs: {
246246
);
247247
in
248248
{
249-
mod = callPackage ./kernel-modules.nix {
250-
open = false;
251-
nvidia_x11 = finalAttrs.finalPackage;
252-
# build files already patched when building the main package, so no need to patch them again
253-
patches = [ ];
254-
inherit broken;
255-
};
249+
mod =
250+
if !libsOnly then
251+
callPackage ./kernel-modules.nix {
252+
open = false;
253+
nvidia_x11 = finalAttrs.finalPackage;
254+
# build files already patched when building the main package, so no need to patch them again
255+
patches = [ ];
256+
inherit broken;
257+
}
258+
else
259+
{ };
256260
open = lib.mapNullable (
257261
hash:
258262
callPackage ./kernel-modules.nix {

0 commit comments

Comments
 (0)