mesa: add symlinks from $out/lib/*.so to $drivers/lib

This is mainly in order for libGL to be present in /run/opengl-drivers{,-32}.
Now even with mesa drivers pkgs will use your current nixos libGL
instead of the one it was built against.

Thanks to @iElectric for suggesting this change.
This commit is contained in:
Vladimír Čunát 2014-03-23 20:32:47 +01:00
parent 02b85f5191
commit 97f1a251ed

View File

@ -152,6 +152,11 @@ stdenv.mkDerivation {
substituteInPlace "$out/lib/pkgconfig/dri.pc" --replace '$(drivers)' "${driverLink}"
'' + /* move vdpau drivers to $drivers/lib, so they are found */ ''
mv "$drivers"/lib/vdpau/* "$drivers"/lib/ && rmdir "$drivers"/lib/vdpau
'' + /* add libGL* links from /run/opengl-driver */ ''
(
cd "$drivers/lib"
cp -s "$out"/lib/*.so .
)
'';
#ToDo: @vcunat isn't sure if drirc will be found when in $out/etc/, but it doesn't seem important ATM