git.iko.soy/typeable/nixpkgs
on master help sign in
nvidia-x11: add disable32Bit arg to not include 32-bit nvidia

In some contexts, we don’t want to have to build the whole i686 stdenv just to use the x86_64 nvidia driver. It’s hard to know ahead of time what we want, so it’s best to leave this as an overridable option.

commit31d8669a72667f288591669b803f560a5d5e1756 authorMatthew Bauer <mjbauer95@gmail.com> dateThu 20 Aug 2020, 10:29 (6 years ago) parente5a097a
1 file changed+4−1
pkgs/os-specific/linux/nvidia-x11/generic.nix+4−1
pkgs/os-specific/linux/nvidia-x11/generic.nix+4−1
@@ -19,6 +19,9 @@
1919 # nvidia-settings). Used to support 32-bit binaries on 64-bit
2020 # Linux.
2121 libsOnly ? false
22+, # don't include the bundled 32-bit libraries on 64-bit platforms,
23+ # even if it’s in downloaded binary
24+ disable32Bit ? false
2225}:
2326
2427with stdenv.lib;
@@ -30,7 +33,7 @@ assert ! versionOlder version "391" -> stdenv.hostPlatform.system == "x86_64-lin
3033let
3134 nameSuffix = optionalString (!libsOnly) "-${kernel.version}";
3235 pkgSuffix = optionalString (versionOlder version "304") "-pkg0";
33− i686bundled = versionAtLeast version "391";
36+ i686bundled = versionAtLeast version "391" && !disable32Bit;
3437
3538 libPathFor = pkgs: pkgs.lib.makeLibraryPath [ pkgs.libdrm pkgs.xorg.libXext pkgs.xorg.libX11
3639 pkgs.xorg.libXv pkgs.xorg.libXrandr pkgs.xorg.libxcb pkgs.zlib pkgs.stdenv.cc.cc ];