summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorDavid Guibert <david.guibert@gmail.com>2013-01-03 11:03:16 +0100
committerDavid Guibert <david.guibert@gmail.com>2013-01-13 17:38:56 +0100
commit0f2874dd081d8e0ae59d47ab855af6c283acdec0 (patch)
tree87c509dd993e49b26d60c1d0a1367bd660a051b8 /pkgs
parent553e1b16f006d4b17dc0990a5efc693d06ea2805 (diff)
downloadnixpkgs-0f2874dd081d8e0ae59d47ab855af6c283acdec0.tar
nixpkgs-0f2874dd081d8e0ae59d47ab855af6c283acdec0.tar.gz
nixpkgs-0f2874dd081d8e0ae59d47ab855af6c283acdec0.tar.bz2
nixpkgs-0f2874dd081d8e0ae59d47ab855af6c283acdec0.tar.lz
nixpkgs-0f2874dd081d8e0ae59d47ab855af6c283acdec0.tar.xz
nixpkgs-0f2874dd081d8e0ae59d47ab855af6c283acdec0.tar.zst
nixpkgs-0f2874dd081d8e0ae59d47ab855af6c283acdec0.zip
nvidia96: update to support new X ABI
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/os-specific/linux/nvidia-x11/acpixf.patch27
-rw-r--r--pkgs/os-specific/linux/nvidia-x11/generated.patch12
-rw-r--r--pkgs/os-specific/linux/nvidia-x11/legacy96.nix16
-rw-r--r--pkgs/os-specific/linux/nvidia-x11/patchlevel.patch59
-rw-r--r--pkgs/os-specific/linux/nvidia-x11/switch_to.patch24
5 files changed, 3 insertions, 135 deletions
diff --git a/pkgs/os-specific/linux/nvidia-x11/acpixf.patch b/pkgs/os-specific/linux/nvidia-x11/acpixf.patch
deleted file mode 100644
index c94641c6919..00000000000
--- a/pkgs/os-specific/linux/nvidia-x11/acpixf.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff -pur 96.43.20/conftest.sh 96.43.20-3.4/conftest.sh
---- 96.43.20/conftest.sh	2011-07-18 10:51:11.000000000 +0400
-+++ 96.43.20-3.4/conftest.sh	2012-06-16 00:04:22.870746239 +0400
-@@ -908,6 +908,7 @@ compile_test() {
-             #
-             echo "$CONFTEST_PREAMBLE
-             #include <acpi/acpi.h>
-+            #include <acpi/acpixf.h>
-             void conftest_acpi_walk_namespace(void) {
-                 acpi_walk_namespace();
-             }" > conftest$$.c
-@@ -923,6 +924,7 @@ compile_test() {
- 
-             echo "$CONFTEST_PREAMBLE
-             #include <acpi/acpi.h>
-+            #include <acpi/acpixf.h>
-             void conftest_acpi_walk_namespace(void) {
-                 acpi_walk_namespace(0, NULL, 0, NULL, NULL, NULL, NULL);
-             }" > conftest$$.c
-@@ -939,6 +941,7 @@ compile_test() {
- 
-             echo "$CONFTEST_PREAMBLE
-             #include <acpi/acpi.h>
-+            #include <acpi/acpixf.h>
-             void conftest_acpi_walk_namespace(void) {
-                 acpi_walk_namespace(0, NULL, 0, NULL, NULL, NULL);
-             }" > conftest$$.c
diff --git a/pkgs/os-specific/linux/nvidia-x11/generated.patch b/pkgs/os-specific/linux/nvidia-x11/generated.patch
deleted file mode 100644
index 6cf7a93c644..00000000000
--- a/pkgs/os-specific/linux/nvidia-x11/generated.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -pur 173.14.31/conftest.sh 173.14.31-3.3/conftest.sh
---- 173.14.31/conftest.sh	2011-07-18 09:49:58.000000000 +0400
-+++ 173.14.31-3.3/conftest.sh	2012-04-09 19:33:34.407928432 +0400
-@@ -123,7 +123,7 @@ build_cflags() {
-     CFLAGS="$BASE_CFLAGS $MACH_CFLAGS $OUTPUT_CFLAGS -I$HEADERS $AUTOCONF_CFLAGS"
- 
-     if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
--        CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include"
-+        CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include -I$SOURCES/arch/x86/include/generated"
-     fi
-     if [ -n "$BUILD_PARAMS" ]; then
-         CFLAGS="$CFLAGS -D$BUILD_PARAMS"
diff --git a/pkgs/os-specific/linux/nvidia-x11/legacy96.nix b/pkgs/os-specific/linux/nvidia-x11/legacy96.nix
index fd27a989c07..8e1fb784ae3 100644
--- a/pkgs/os-specific/linux/nvidia-x11/legacy96.nix
+++ b/pkgs/os-specific/linux/nvidia-x11/legacy96.nix
@@ -2,7 +2,7 @@
 
 let 
 
-  versionNumber = "96.43.20";
+  versionNumber = "96.43.23";
 
 in
 
@@ -15,27 +15,17 @@ stdenv.mkDerivation {
     if stdenv.system == "i686-linux" then
       fetchurl {
         url = "http://us.download.nvidia.com/XFree86/Linux-x86/${versionNumber}/NVIDIA-Linux-x86-${versionNumber}-pkg0.run";
-        sha256 = "05vm36jnydp4cfdkfvrvxczd64i3f0pp0yp7dn8y8pklrxi80xxw";
+        sha256 = "0hi10h26l51mknr57zsdg0zaxcqdz1lp3hsz0hi1c1vkpbsavrji";
       }
     else if stdenv.system == "x86_64-linux" then
       fetchurl {
         url = "http://us.download.nvidia.com/XFree86/Linux-x86_64/${versionNumber}/NVIDIA-Linux-x86_64-${versionNumber}-pkg0.run";
-        sha256 = "0a8ninp4wyql3xh6z93dzhbacvz7g0h8gs4pg5279a0i6h05wb1w";
+        sha256 = "09vynha40rsxpklj1m0qjfg853ckdpi9g87h06irikh405x57kzp";
       }
     else throw "nvidia-x11 does not support platform ${stdenv.system}";
 
   inherit versionNumber kernel;
 
-  # Only for kernels 3.4 and over
-  # Patches taken from arch linux AUR 
-  # https://aur.archlinux.org/packages.php?ID=57698
-  kpatches = stdenv.lib.optionals (stdenv.lib.strings.versionOlder "3.4" kernel.version)
-    [ ./acpixf.patch
-      ./generated.patch
-      ./patchlevel.patch
-      ./switch_to.patch
-    ];
-
   dontStrip = true;
 
   glPath = stdenv.lib.makeLibraryPath [xlibs.libXext xlibs.libX11 xlibs.libXrandr];
diff --git a/pkgs/os-specific/linux/nvidia-x11/patchlevel.patch b/pkgs/os-specific/linux/nvidia-x11/patchlevel.patch
deleted file mode 100644
index 256922ca966..00000000000
--- a/pkgs/os-specific/linux/nvidia-x11/patchlevel.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-diff -pur 96.43.20-t1/conftest.sh 96.43.20-t2/conftest.sh
---- 96.43.20-t1/conftest.sh	2012-06-16 17:14:47.206589267 +0400
-+++ 96.43.20-t2/conftest.sh	2012-06-16 15:35:45.049203248 +0400
-@@ -1303,10 +1303,14 @@ case "$5" in
-         MAKEFILE=$HEADERS/../Makefile
- 
-         if [ -f $MAKEFILE ]; then
-+            VERSION=$(grep "^VERSION =" $MAKEFILE | cut -d " " -f 3)
-             PATCHLEVEL=$(grep "^PATCHLEVEL =" $MAKEFILE | cut -d " " -f 3)
- 
--            if [ -z "$PATCHLEVEL" ]; then
-+            if [ -z "$PATCHLEVEL" -o -z "$VERSION" ]; then
-                 exit 1
-+            elif [ "$VERSION" = '3' ]; then
-+                echo 6
-+                exit 0                
-             else
-                 echo $PATCHLEVEL
-                 exit 0
-@@ -1426,10 +1430,11 @@ case "$5" in
-                 # kernel older than 2.6.6, that's all we require to
-                 # build the module.
-                 #
-+                VERSION=$(grep "^VERSION =" $MAKEFILE | cut -d " " -f 3)
-                 PATCHLEVEL=$(grep "^PATCHLEVEL =" $MAKEFILE | cut -d " " -f 3)
-                 SUBLEVEL=$(grep "^SUBLEVEL =" $MAKEFILE | cut -d " " -f 3)
- 
--                if [ -n "$PATCHLEVEL" -a $PATCHLEVEL -ge 6 \
-+                if [ "$VERSION" = '2' -a -n "$PATCHLEVEL" -a $PATCHLEVEL -ge 6 \
-                         -a -n "$SUBLEVEL" -a $SUBLEVEL -le 5 ]; then
-                     SELECTED_MAKEFILE=Makefile.kbuild
-                     RET=0
-@@ -1525,11 +1530,12 @@ case "$5" in
-                 # This source tree is not configured, but includes
-                 # the top-level Makefile.
-                 #
-+                VERSION=$(grep "^VERSION =" $MAKEFILE | cut -d " " -f 3)
-                 PATCHLEVEL=$(grep "^PATCHLEVEL =" $MAKEFILE | cut -d " " -f 3)
-                 SUBLEVEL=$(grep "^SUBLEVEL =" $MAKEFILE | cut -d " " -f 3)
- 
--                if [ -n "$PATCHLEVEL" -a -n "$SUBLEVEL" ]; then
--                    echo 2.$PATCHLEVEL.$SUBLEVEL
-+                if [ -n "$VERSION" -a -n "$PATCHLEVEL" -a -n "$SUBLEVEL" ]; then
-+                    echo $VERSION.$PATCHLEVEL.$SUBLEVEL
-                     RET=0
-                 fi
-             fi
-diff -pur 96.43.20-t1/Makefile.kbuild 96.43.20-t2/Makefile.kbuild
---- 96.43.20-t1/Makefile.kbuild	2011-07-18 10:51:11.000000000 +0400
-+++ 96.43.20-t2/Makefile.kbuild	2012-06-16 17:08:11.694605133 +0400
-@@ -132,7 +132,7 @@ MODULE_ROOT := /lib/modules/$(KERNEL_UNA
- #
- 
- TOPDIR ?= $(KERNEL_SOURCES)
--PATCHLEVEL ?= $(shell $(CONFTEST) kernel_patch_level)
-+PATCHLEVEL := $(shell $(CONFTEST) kernel_patch_level)
- 
- #
- # Linux 2.4 uses the .o module extension. Linux 2.6, however, uses the .ko
diff --git a/pkgs/os-specific/linux/nvidia-x11/switch_to.patch b/pkgs/os-specific/linux/nvidia-x11/switch_to.patch
deleted file mode 100644
index 51ffa7f83f1..00000000000
--- a/pkgs/os-specific/linux/nvidia-x11/switch_to.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -pur 173.14.31-3.3/conftest.sh 173.14.31-3.4/conftest.sh
---- 173.14.31-3.3/conftest.sh	2012-04-09 19:33:34.407928432 +0400
-+++ 173.14.31-3.4/conftest.sh	2012-04-10 19:50:36.052346728 +0400
-@@ -465,7 +465,7 @@ compile_test() {
-             # and if it as an 'event' member.
-             #
-             echo "$CONFTEST_PREAMBLE
--            #include <asm/system.h>
-+            #include <asm/switch_to.h>
-             #include <linux/pm.h>
-             void conftest_pm_message_t(pm_message_t state) {
-                 pm_message_t *p = &state;
-diff -pur 173.14.31-3.3/nv-linux.h 173.14.31-3.4/nv-linux.h
---- 173.14.31-3.3/nv-linux.h	2011-07-18 09:49:58.000000000 +0400
-+++ 173.14.31-3.4/nv-linux.h	2012-04-10 19:53:04.853776013 +0400
-@@ -92,7 +92,7 @@
- #include <linux/timer.h>
- 
- #include <asm/div64.h>              /* do_div()                         */
--#include <asm/system.h>             /* cli, sli, save_flags             */
-+#include <asm/switch_to.h>          /* cli, sli, save_flags             */
- #include <asm/io.h>                 /* ioremap, virt_to_phys            */
- #include <asm/uaccess.h>            /* access_ok                        */
- #include <asm/page.h>               /* PAGE_OFFSET                      */