Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
base: 1036dc664169
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: a6ce6c10525f
Choose a head ref
  • 2 commits
  • 6 files changed
  • 2 contributors

Commits on May 26, 2019

  1. nixos: Don't set LD_LIBRARY_PATH for graphics drivers that don't need…

    … it.
    
    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.
    ambrop72 committed May 26, 2019
    Copy the full SHA
    370d3af View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2019

  1. Merge pull request #61981 from ambrop72/no-opengl-ld-library-path

    nixos: Don't set LD_LIBRARY_PATH for graphics drivers that don't need it.
    worldofpeace committed Jul 11, 2019
    Copy the full SHA
    a6ce6c1 View commit details
    Browse the repository at this point in the history