libglvnd, ocl-icd, vulkan-loader: Add /run/opengl-driver(-32) to RUNPATH. (#60985)
libglvnd, ocl-icd, vulkan-loader: Add /run/opengl-driver(-32) to RUNPATH.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
, ilmbase, libXi, libX11, libXext, libXrender
|
||||
, libjpeg, libpng, libsamplerate, libsndfile
|
||||
, libtiff, libGLU_combined, openal, opencolorio, openexr, openimageio, openjpeg_1, pythonPackages
|
||||
, zlib, fftw, opensubdiv, freetype, jemalloc, ocl-icd
|
||||
, zlib, fftw, opensubdiv, freetype, jemalloc, ocl-icd, addOpenGLRunpath
|
||||
, jackaudioSupport ? false, libjack2
|
||||
, cudaSupport ? config.cudaSupport or false, cudatoolkit
|
||||
, colladaSupport ? true, opencollada
|
||||
@@ -21,8 +21,9 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "1g4kcdqmf67srzhi3hkdnr4z1ph4h9sza1pahz38mrj998q4r52c";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ] ++ optional cudaSupport addOpenGLRunpath;
|
||||
buildInputs =
|
||||
[ boost cmake ffmpeg gettext glew ilmbase
|
||||
[ boost ffmpeg gettext glew ilmbase
|
||||
libXi libX11 libXext libXrender
|
||||
freetype libjpeg libpng libsamplerate libsndfile libtiff libGLU_combined openal
|
||||
opencolorio openexr openimageio openjpeg_1 python zlib fftw jemalloc
|
||||
@@ -80,6 +81,15 @@ stdenv.mkDerivation rec {
|
||||
--prefix PYTHONPATH : ${pythonPackages.numpy}/${python.sitePackages}
|
||||
'';
|
||||
|
||||
# Set RUNPATH so that libcuda and libnvrtc in /run/opengl-driver(-32)/lib can be
|
||||
# found. See the explanation in libglvnd.
|
||||
postFixup = optionalString cudaSupport ''
|
||||
for program in $out/bin/blender $out/bin/.blender-wrapped; do
|
||||
isELF "$program" || continue
|
||||
addOpenGLRunpath "$program"
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "3D Creation/Animation/Publishing System";
|
||||
homepage = https://www.blender.org;
|
||||
|
||||
Reference in New Issue
Block a user