New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mesa: Set datadir so that the path to the DriConf defaults is correct #89657
Conversation
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/issues-preventing-proper-freesync-support/7450/4 |
Why not the other way around? |
@vcunat so should I move the whole $ du -sh /nix/store/br6c6zm6n8h48qyrb9a4qvf3nyqkcvr6-mesa-20.0.2-drivers/share/
64K /nix/store/br6c6zm6n8h48qyrb9a4qvf3nyqkcvr6-mesa-20.0.2-drivers/share/
$ tree /nix/store/br6c6zm6n8h48qyrb9a4qvf3nyqkcvr6-mesa-20.0.2-drivers/share/
/nix/store/br6c6zm6n8h48qyrb9a4qvf3nyqkcvr6-mesa-20.0.2-drivers/share/
├── drirc.d
│ └── 00-mesa-defaults.conf
├── glvnd
│ └── egl_vendor.d
│ └── 50_mesa.json
└── vulkan
└── icd.d
├── intel_icd.x86_64.json
└── radeon_icd.x86_64.json
5 directories, 4 files In that case I think it would not end up in If we only load |
Other than making sure stuff gets found, I don't immediately know if it makes sense to configure any of these impurely (without rebuild). Theoretically it's a difference whether you use your OS settings ( |
The effective change is that "drirc.d/00-mesa-defaults.conf" will now be installed to $out instead of $drivers and not appear under "/run/opengl-driver/share/" anymore. This is done to fix NixOS#89421, i.e. so that Mesa will find and load the included DriConf defaults. The other files in "$drivers/share" will not be moved to $out as some Nixpkgs logic might depend on them being available under "/run/opengl-driver/share/" (e.g. addOpenGLRunpath).
9cdea4c
to
cd41673
Compare
Ok, so I finally had time for another look and decided to go with a more conservative approach. The most conservative approach I could think is installing the files in |
Motivation for this change
This should fix #89421. Unfortunately it results in a cyclic dependency:
cycle detected in the references of '/nix/store/4mnbqgm2a4b055mpmdak2b17ccp1ah82-mesa-20.0.2' from '/nix/store/br6c6zm6n8h48qyrb9a4qvf3nyqkcvr6-mesa-20.0.2-drivers'
The cycle probably comes from
src/util/xmlconfig.c
in which case we cannot just drop the dependency. The problem is:On NixOS we could use
/run/opengl-driver/share/
but then this wouldn't work on non-NixOS systems.@vcunat any ideas what to do here?
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)