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.
This commit is contained in:
parent
e5a097a8cd
commit
31d8669a72
1 changed files with 4 additions and 1 deletions
|
@ -19,6 +19,9 @@
|
||||||
# nvidia-settings). Used to support 32-bit binaries on 64-bit
|
# nvidia-settings). Used to support 32-bit binaries on 64-bit
|
||||||
# Linux.
|
# Linux.
|
||||||
libsOnly ? false
|
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;
|
with stdenv.lib;
|
||||||
|
@ -30,7 +33,7 @@ assert ! versionOlder version "391" -> stdenv.hostPlatform.system == "x86_64-lin
|
||||||
let
|
let
|
||||||
nameSuffix = optionalString (!libsOnly) "-${kernel.version}";
|
nameSuffix = optionalString (!libsOnly) "-${kernel.version}";
|
||||||
pkgSuffix = optionalString (versionOlder version "304") "-pkg0";
|
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
|
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 ];
|
pkgs.xorg.libXv pkgs.xorg.libXrandr pkgs.xorg.libxcb pkgs.zlib pkgs.stdenv.cc.cc ];
|
||||||
|
|
Loading…
Reference in a new issue