Skip to content
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

libglvnd, ocl-icd, vulkan-loader: Remove addOpenGLRunpath where not needed. #64945

Merged
merged 1 commit into from
Aug 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions pkgs/development/libraries/libglvnd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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; };
Expand Down
8 changes: 1 addition & 7 deletions pkgs/development/libraries/ocl-icd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,14 @@ stdenv.mkDerivation rec {
sha256 = "0f14gpa13sdm0kzqv5yycp4pschbmi6n5fj7wl4ilspzsrqcgqr2";
};

nativeBuildInputs = [ ruby addOpenGLRunpath ];
nativeBuildInputs = [ ruby ];

buildInputs = [ opencl-headers ];

postPatch = ''
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/;
Expand Down
8 changes: 1 addition & 7 deletions pkgs/development/libraries/vulkan-loader/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
sha256 = "0zhrwj1gi90x2w8gaaaw5h4b969a8gfy244kn0drrplhhb1nqz3b";
};

nativeBuildInputs = [ pkgconfig addOpenGLRunpath ];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ cmake python3 xlibsWrapper libxcb libXrandr libXext wayland ];
enableParallelBuilding = true;

Expand All @@ -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;
Expand Down