Conditionally include nvidia modules

This commit is contained in:
Matthieu Coudron
2019-08-10 02:28:12 +09:00
parent 4e30a2852c
commit 31c3a53dc3
2 changed files with 7 additions and 3 deletions
@@ -1,7 +1,11 @@
{ lib, callPackage, fetchurl, stdenv }:
let
generic = args: callPackage (import ./generic.nix args) { };
generic = args:
if ((!lib.versionOlder args.version "391")
&& stdenv.hostPlatform.system != "x86_64-linux") then null
else callPackage (import ./generic.nix args) { };
kernel = callPackage # a hacky way of extracting parameters from callPackage
({ kernel, libsOnly ? false }: if libsOnly then { } else kernel) { };