Merge pull request #99323 from eadwu/nvidia/hardware.nvidia.package
nixos: hardware.nvidia.package option for selecting nvidia package
This commit is contained in:
@@ -1,11 +1,17 @@
|
||||
{ lib, callPackage, fetchpatch, fetchurl, stdenv }:
|
||||
{ lib, callPackage, fetchpatch, fetchurl, stdenv, pkgsi686Linux }:
|
||||
|
||||
let
|
||||
|
||||
generic = args:
|
||||
if ((!lib.versionOlder args.version "391")
|
||||
generic = args: let
|
||||
imported = import ./generic.nix args;
|
||||
in if ((!lib.versionOlder args.version "391")
|
||||
&& stdenv.hostPlatform.system != "x86_64-linux") then null
|
||||
else callPackage (import ./generic.nix args) { };
|
||||
else callPackage imported {
|
||||
lib32 = (pkgsi686Linux.callPackage imported {
|
||||
libsOnly = true;
|
||||
kernel = null;
|
||||
}).out;
|
||||
};
|
||||
|
||||
kernel = callPackage # a hacky way of extracting parameters from callPackage
|
||||
({ kernel, libsOnly ? false }: if libsOnly then { } else kernel) { };
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
, # don't include the bundled 32-bit libraries on 64-bit platforms,
|
||||
# even if it’s in downloaded binary
|
||||
disable32Bit ? false
|
||||
# 32 bit libs only version of this package
|
||||
, lib32 ? null
|
||||
}:
|
||||
|
||||
with lib;
|
||||
@@ -93,6 +95,8 @@ let
|
||||
};
|
||||
persistenced = mapNullable (hash: callPackage (import ./persistenced.nix self hash) { }) persistencedSha256;
|
||||
inherit persistencedVersion settingsVersion;
|
||||
} // optionalAttrs (!i686bundled) {
|
||||
inherit lib32;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
Reference in New Issue
Block a user