summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-04-06 15:50:01 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-04-06 15:53:14 +0200
commit59ef7d25c3944f2b46461181f6bc99f183389644 (patch)
tree6b30293277c8195c2164ab39b4b27df3edf8ceb9
parent77103edec2456984ee3c7aae8adb29aefe36af8e (diff)
downloadnixlib-59ef7d25c3944f2b46461181f6bc99f183389644.tar
nixlib-59ef7d25c3944f2b46461181f6bc99f183389644.tar.gz
nixlib-59ef7d25c3944f2b46461181f6bc99f183389644.tar.bz2
nixlib-59ef7d25c3944f2b46461181f6bc99f183389644.tar.lz
nixlib-59ef7d25c3944f2b46461181f6bc99f183389644.tar.xz
nixlib-59ef7d25c3944f2b46461181f6bc99f183389644.tar.zst
nixlib-59ef7d25c3944f2b46461181f6bc99f183389644.zip
nvidia-x11: 358.16 -> 361.42
This fixes the segfault reported in #13942 caused by missing
libEGL.so.0 and libEGL_nvidia.so.0 symlinks.
-rwxr-xr-xpkgs/os-specific/linux/nvidia-x11/builder.sh21
-rw-r--r--pkgs/os-specific/linux/nvidia-x11/default.nix6
2 files changed, 14 insertions, 13 deletions
diff --git a/pkgs/os-specific/linux/nvidia-x11/builder.sh b/pkgs/os-specific/linux/nvidia-x11/builder.sh
index c1f165c45dd5..1f4671a76157 100755
--- a/pkgs/os-specific/linux/nvidia-x11/builder.sh
+++ b/pkgs/os-specific/linux/nvidia-x11/builder.sh
@@ -34,6 +34,8 @@ installPhase() {
     cp -prd *.so.* tls "$out/lib/"
     rm "$out"/lib/lib{glx,nvidia-wfb}.so.* # handled separately
 
+    rm $out/lib/libGL.so.1.* # GLVND
+
     if test -z "$libsOnly"; then
         # Install the X drivers.
         mkdir -p $out/lib/xorg/modules
@@ -60,16 +62,18 @@ installPhase() {
 
       libname_short=`echo -n "$libname" | sed 's/so\..*/so/'`
 
-      # nvidia's EGL stack seems to expect libGLESv2.so.2 to be available
-      if [ $(basename "$libname_short") == "libGLESv2.so" ]; then
-          ln -srnf "$libname" "$libname_short.2"
-      fi
-
       if [[ "$libname" != "$libname_short" ]]; then
         ln -srnf "$libname" "$libname_short"
       fi
-      if [[ "$libname" != "$libname_short.1" ]]; then
-        ln -srnf "$libname" "$libname_short.1"
+
+      if [[ $libname_short =~ libEGL.so || $libname_short =~ libEGL_nvidia.so ]]; then
+          major=0
+      else
+          major=1
+      fi
+
+      if [[ "$libname" != "$libname_short.$major" ]]; then
+        ln -srnf "$libname" "$libname_short.$major"
       fi
     done
 
@@ -119,9 +123,6 @@ installPhase() {
     # For simplicity and dependency reduction, don't support the gtk3 interface.
     rm $out/lib/libnvidia-gtk3.*
 
-    # We distribute these separately in `libvdpau`
-    rm "$out"/lib/libvdpau{.*,_trace.*}
-
     # Move VDPAU libraries to their place
     mkdir "$out"/lib/vdpau
     mv "$out"/lib/libvdpau* "$out"/lib/vdpau
diff --git a/pkgs/os-specific/linux/nvidia-x11/default.nix b/pkgs/os-specific/linux/nvidia-x11/default.nix
index fff1135d3118..e67df53c9ed0 100644
--- a/pkgs/os-specific/linux/nvidia-x11/default.nix
+++ b/pkgs/os-specific/linux/nvidia-x11/default.nix
@@ -12,7 +12,7 @@ assert (!libsOnly) -> kernel != null;
 
 let
 
-  versionNumber = "358.16";
+  versionNumber = "361.42";
 
   # Policy: use the highest stable version as the default (on our master).
   inherit (stdenv.lib) makeLibraryPath;
@@ -28,12 +28,12 @@ stdenv.mkDerivation {
     if stdenv.system == "i686-linux" then
       fetchurl {
         url = "http://download.nvidia.com/XFree86/Linux-x86/${versionNumber}/NVIDIA-Linux-x86-${versionNumber}.run";
-        sha256 = "1cc0zsri92nz2mznabfd6pqckm9mlbszmysqqqh3w5mipwn898nk";
+        sha256 = "10jfdrmjcddgp7kg9l3dwxjh4b7sdrg86nwaf6zalfnsc9zh8bg3";
       }
     else if stdenv.system == "x86_64-linux" then
       fetchurl {
         url = "http://download.nvidia.com/XFree86/Linux-x86_64/${versionNumber}/NVIDIA-Linux-x86_64-${versionNumber}-no-compat32.run";
-        sha256 = "1xr16faam2zsx8ajwm9g9302m6qjzyjh1zd56g8jhc8jxg8h43sg";
+        sha256 = "04yyrzk4xzq1i386mdxfwg4dqiclvj1fm195qsqy0r79zmpc3kq4";
       }
     else throw "nvidia-x11 does not support platform ${stdenv.system}";