Loading pkgs/os-specific/linux/nvidia-x11/builder.sh +20 −13 Original line number Diff line number Diff line Loading @@ -185,20 +185,27 @@ installPhase() { patchelf --set-rpath "$out/lib:$libPath" "$libname" fi libname_short=`echo -n "$libname" | sed 's/so\..*/so/'` # Manually create the right symlinks for the libraries. # # We can't just use ldconfig, because it does not create libfoo.so symlinks, # only libfoo.so.1. # Also, the symlink chain must be libfoo.so -> libfoo.so.1 -> libfoo.so.123.45, # or ldconfig will explode. # See: https://github.com/bminor/glibc/blob/6f3f6c506cdaf981a4374f1f12863b98ac7fea1a/elf/ldconfig.c#L854-L877 if [[ "$libname" != "$libname_short" ]]; then ln -srnf "$libname" "$libname_short" fi libbase=$(basename "$libname") libdir=$(dirname "$libname") soname=$(patchelf --print-soname "$libname") unversioned=${libbase/\.so\.[0-9\.]*/.so} if [[ $libname_short =~ libEGL.so || $libname_short =~ libEGL_nvidia.so || $libname_short =~ libGLX.so || $libname_short =~ libGLX_nvidia.so ]]; then major=0 else major=1 if [[ -n "$soname" ]]; then if [[ "$soname" != "$libbase" ]]; then ln -s "$libbase" "$libdir/$soname" fi if [[ "$libname" != "$libname_short.$major" ]]; then ln -srnf "$libname" "$libname_short.$major" if [[ "$soname" != "$unversioned" ]]; then ln -s "$soname" "$libdir/$unversioned" fi fi done Loading Loading
pkgs/os-specific/linux/nvidia-x11/builder.sh +20 −13 Original line number Diff line number Diff line Loading @@ -185,20 +185,27 @@ installPhase() { patchelf --set-rpath "$out/lib:$libPath" "$libname" fi libname_short=`echo -n "$libname" | sed 's/so\..*/so/'` # Manually create the right symlinks for the libraries. # # We can't just use ldconfig, because it does not create libfoo.so symlinks, # only libfoo.so.1. # Also, the symlink chain must be libfoo.so -> libfoo.so.1 -> libfoo.so.123.45, # or ldconfig will explode. # See: https://github.com/bminor/glibc/blob/6f3f6c506cdaf981a4374f1f12863b98ac7fea1a/elf/ldconfig.c#L854-L877 if [[ "$libname" != "$libname_short" ]]; then ln -srnf "$libname" "$libname_short" fi libbase=$(basename "$libname") libdir=$(dirname "$libname") soname=$(patchelf --print-soname "$libname") unversioned=${libbase/\.so\.[0-9\.]*/.so} if [[ $libname_short =~ libEGL.so || $libname_short =~ libEGL_nvidia.so || $libname_short =~ libGLX.so || $libname_short =~ libGLX_nvidia.so ]]; then major=0 else major=1 if [[ -n "$soname" ]]; then if [[ "$soname" != "$libbase" ]]; then ln -s "$libbase" "$libdir/$soname" fi if [[ "$libname" != "$libname_short.$major" ]]; then ln -srnf "$libname" "$libname_short.$major" if [[ "$soname" != "$unversioned" ]]; then ln -s "$soname" "$libdir/$unversioned" fi fi done Loading