From 31d8669a72667f288591669b803f560a5d5e1756 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Thu, 20 Aug 2020 10:29:28 -0500 Subject: [PATCH] nvidia-x11: add disable32Bit arg to not include 32-bit nvidia MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- pkgs/os-specific/linux/nvidia-x11/generic.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/nvidia-x11/generic.nix b/pkgs/os-specific/linux/nvidia-x11/generic.nix index d62ade04e63..63091e9875f 100644 --- a/pkgs/os-specific/linux/nvidia-x11/generic.nix +++ b/pkgs/os-specific/linux/nvidia-x11/generic.nix @@ -19,6 +19,9 @@ # nvidia-settings). Used to support 32-bit binaries on 64-bit # Linux. libsOnly ? false +, # don't include the bundled 32-bit libraries on 64-bit platforms, + # even if it’s in downloaded binary + disable32Bit ? false }: with stdenv.lib; @@ -30,7 +33,7 @@ assert ! versionOlder version "391" -> stdenv.hostPlatform.system == "x86_64-lin let nameSuffix = optionalString (!libsOnly) "-${kernel.version}"; pkgSuffix = optionalString (versionOlder version "304") "-pkg0"; - i686bundled = versionAtLeast version "391"; + i686bundled = versionAtLeast version "391" && !disable32Bit; libPathFor = pkgs: pkgs.lib.makeLibraryPath [ pkgs.libdrm pkgs.xorg.libXext pkgs.xorg.libX11 pkgs.xorg.libXv pkgs.xorg.libXrandr pkgs.xorg.libxcb pkgs.zlib pkgs.stdenv.cc.cc ];