370d3af0c4
A new internal option `hardware.opengl.setLdLibraryPath` is added which controls if `LD_LIBRARY_PATH` should be set to `/run/opengl-driver(-32)/lib`. It is false by default and is meant to be set to true by any driver which requires it. If this option is false, then `opengl.nix` and `xserver.nix` will not set `LD_LIBRARY_PATH`. Currently Mesa and NVidia drivers don't set `setLdLibraryPath` because they work with libglvnd and do not override libraries, while `amdgpu-pro`, `ati` and `parallels-guest` set it to true (the former two really need it, the last one doesn't build so is presumed to). Additionally, the `libPath` attribute within entries of `services.xserver.drivers` is removed. This made `xserver.nix` add the driver path directly to the `LD_LIBRARY_PATH` for the display manager (including X server). Not only is it redundant when the driver is added to `hardware.opengl.package` (assuming that `hardware.opengl.enable` is true), in fact all current drivers except `ati` set it incorrectly to the package path instead of package/lib. This removal of `LD_LIBRARY_PATH` could break certain packages using CUDA, but only those that themselves load `libcuda` or other NVidia driver libraries using `dlopen` (not if they just use `cudatoolkit`). A few have already been fixed but it is practically impossible to test all because most packages using CUDA are libraries/frameworks without a simple way to test. Fixes #11434 if only Mesa or NVidia graphics drivers are used. |
||
---|---|---|
.. | ||
amazon-image.nix | ||
amazon-init.nix | ||
amazon-options.nix | ||
anbox.nix | ||
azure-agent-entropy.patch | ||
azure-agent.nix | ||
azure-bootstrap-blobs.nix | ||
azure-common.nix | ||
azure-config-user.nix | ||
azure-config.nix | ||
azure-image.nix | ||
azure-images.nix | ||
brightbox-config.nix | ||
brightbox-image.nix | ||
cloudstack-config.nix | ||
container-config.nix | ||
containers.nix | ||
docker-containers.nix | ||
docker-image.nix | ||
docker-preloader.nix | ||
docker.nix | ||
ec2-amis.nix | ||
ec2-data.nix | ||
ec2-metadata-fetcher.nix | ||
ecs-agent.nix | ||
gce-images.nix | ||
google-compute-config.nix | ||
google-compute-image.nix | ||
grow-partition.nix | ||
hyperv-guest.nix | ||
kvmgt.nix | ||
libvirtd.nix | ||
lxc-container.nix | ||
lxc.nix | ||
lxcfs.nix | ||
lxd.nix | ||
openstack-config.nix | ||
openvswitch.nix | ||
parallels-guest.nix | ||
qemu-guest-agent.nix | ||
qemu-vm.nix | ||
rkt.nix | ||
virtualbox-guest.nix | ||
virtualbox-host.nix | ||
virtualbox-image.nix | ||
vmware-guest.nix | ||
xe-guest-utilities.nix | ||
xen-dom0.nix | ||
xen-domU.nix |