about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2014-03-23 20:32:47 +0100
committerVladimír Čunát <vcunat@gmail.com>2014-03-23 20:36:37 +0100
commit97f1a251ed5f5446c227d0ece8c0410222ab87ca (patch)
tree12a3ec693c473c81f3fd4a9269a128a977f64d69 /pkgs
parent02b85f51913be7d95dba25b90eace31b862edcae (diff)
downloadnixlib-97f1a251ed5f5446c227d0ece8c0410222ab87ca.tar
nixlib-97f1a251ed5f5446c227d0ece8c0410222ab87ca.tar.gz
nixlib-97f1a251ed5f5446c227d0ece8c0410222ab87ca.tar.bz2
nixlib-97f1a251ed5f5446c227d0ece8c0410222ab87ca.tar.lz
nixlib-97f1a251ed5f5446c227d0ece8c0410222ab87ca.tar.xz
nixlib-97f1a251ed5f5446c227d0ece8c0410222ab87ca.tar.zst
nixlib-97f1a251ed5f5446c227d0ece8c0410222ab87ca.zip
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.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/libraries/mesa/default.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix
index 1018a0e31f33..e5cd54c572f9 100644
--- a/pkgs/development/libraries/mesa/default.nix
+++ b/pkgs/development/libraries/mesa/default.nix
@@ -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