about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorAmbroz Bizjak <abizjak.pro@gmail.com>2019-06-08 20:56:13 +0200
committerNikolay Amiantov <ab@fmap.me>2019-08-18 21:29:42 +0300
commit1bba961e2a1b143faa5589047f07df559178d4a8 (patch)
treecd820874ac40c2d3c711ae0b12d2c7cea832eed9 /pkgs/development
parentebe711a12ffce966f6aebab91494d06dbde58f53 (diff)
downloadnixlib-1bba961e2a1b143faa5589047f07df559178d4a8.tar
nixlib-1bba961e2a1b143faa5589047f07df559178d4a8.tar.gz
nixlib-1bba961e2a1b143faa5589047f07df559178d4a8.tar.bz2
nixlib-1bba961e2a1b143faa5589047f07df559178d4a8.tar.lz
nixlib-1bba961e2a1b143faa5589047f07df559178d4a8.tar.xz
nixlib-1bba961e2a1b143faa5589047f07df559178d4a8.tar.zst
nixlib-1bba961e2a1b143faa5589047f07df559178d4a8.zip
libglvnd, ocl-icd, vulkan-loader: Remove addOpenGLRunpath where not needed.
For APIs that use driver config files, the config files should point to libraries using absolute paths, so `RUNPATH` should be unnecessary. It is still needed for `libGLX` because that does not use config files but the dispatch library receives just a vendor name from the X server.
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/libraries/libglvnd/default.nix7
-rw-r--r--pkgs/development/libraries/ocl-icd/default.nix8
-rw-r--r--pkgs/development/libraries/vulkan-loader/default.nix8
3 files changed, 6 insertions, 17 deletions
diff --git a/pkgs/development/libraries/libglvnd/default.nix b/pkgs/development/libraries/libglvnd/default.nix
index ed6139d48f6f..2b64d5b7220a 100644
--- a/pkgs/development/libraries/libglvnd/default.nix
+++ b/pkgs/development/libraries/libglvnd/default.nix
@@ -43,10 +43,11 @@ stdenv.mkDerivation rec {
     });
   outputs = [ "out" "dev" ];
 
-  # Set RUNPATH so that driver libraries in /run/opengl-driver(-32)/lib can be found.
-  # See the explanation in addOpenGLRunpath.
+  # Set RUNPATH so that libGLX can find driver libraries in /run/opengl-driver(-32)/lib.
+  # Note that libEGL does not need it because it uses driver config files which should
+  # contain absolute paths to libraries.
   postFixup = ''
-    addOpenGLRunpath $out/lib/libGLX.so $out/lib/libEGL.so
+    addOpenGLRunpath $out/lib/libGLX.so
   '';
 
   passthru = { inherit (addOpenGLRunpath) driverLink; };
diff --git a/pkgs/development/libraries/ocl-icd/default.nix b/pkgs/development/libraries/ocl-icd/default.nix
index 6cab843a22b1..84205253554c 100644
--- a/pkgs/development/libraries/ocl-icd/default.nix
+++ b/pkgs/development/libraries/ocl-icd/default.nix
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
     sha256 = "0f14gpa13sdm0kzqv5yycp4pschbmi6n5fj7wl4ilspzsrqcgqr2";
   };
 
-  nativeBuildInputs = [ ruby addOpenGLRunpath ];
+  nativeBuildInputs = [ ruby ];
 
   buildInputs = [ opencl-headers ];
 
@@ -17,12 +17,6 @@ stdenv.mkDerivation rec {
     sed -i 's,"/etc/OpenCL/vendors","${addOpenGLRunpath.driverLink}/etc/OpenCL/vendors",g' ocl_icd_loader.c
   '';
 
-  # Set RUNPATH so that driver libraries in /run/opengl-driver(-32)/lib can be found.
-  # See the explanation in addOpenGLRunpath.
-  postFixup = ''
-    addOpenGLRunpath $out/lib/libOpenCL.so
-  '';
-
   meta = with stdenv.lib; {
     description = "OpenCL ICD Loader for ${opencl-headers.name}";
     homepage    = https://forge.imag.fr/projects/ocl-icd/;
diff --git a/pkgs/development/libraries/vulkan-loader/default.nix b/pkgs/development/libraries/vulkan-loader/default.nix
index d8b94c40c7e4..95d420627c7d 100644
--- a/pkgs/development/libraries/vulkan-loader/default.nix
+++ b/pkgs/development/libraries/vulkan-loader/default.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
     sha256 = "0zhrwj1gi90x2w8gaaaw5h4b969a8gfy244kn0drrplhhb1nqz3b";
   };
 
-  nativeBuildInputs = [ pkgconfig addOpenGLRunpath ];
+  nativeBuildInputs = [ pkgconfig ];
   buildInputs = [ cmake python3 xlibsWrapper libxcb libXrandr libXext wayland ];
   enableParallelBuilding = true;
 
@@ -30,12 +30,6 @@ stdenv.mkDerivation rec {
 
   outputs = [ "out" "dev" ];
 
-  # Set RUNPATH so that driver libraries in /run/opengl-driver(-32)/lib can be found.
-  # See the explanation in addOpenGLRunpath.
-  postFixup = ''
-    addOpenGLRunpath $out/lib/libvulkan.so
-  '';
-
   meta = with stdenv.lib; {
     description = "LunarG Vulkan loader";
     homepage    = https://www.lunarg.com;