From 854293fc7b9c5a8882e7de5a2d14a5adcea265eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Sat, 19 Sep 2009 22:09:08 +0000 Subject: [PATCH] Adding the nvidia legacy drivers (I still use a geForce 4 AGP) svn path=/nixpkgs/trunk/; revision=17284 --- pkgs/os-specific/linux/nvidia-x11/builder.sh | 3 ++ pkgs/os-specific/linux/nvidia-x11/legacy.nix | 45 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++ 3 files changed, 52 insertions(+) create mode 100644 pkgs/os-specific/linux/nvidia-x11/legacy.nix diff --git a/pkgs/os-specific/linux/nvidia-x11/builder.sh b/pkgs/os-specific/linux/nvidia-x11/builder.sh index 16bc0628b9b6..be325766c77f 100755 --- a/pkgs/os-specific/linux/nvidia-x11/builder.sh +++ b/pkgs/os-specific/linux/nvidia-x11/builder.sh @@ -60,7 +60,10 @@ installPhase() { patchelf --set-rpath $out/lib:$glPath $out/lib/libGL.so.*.* patchelf --set-rpath $out/lib:$glPath $out/lib/libXvMCNVIDIA.so.*.* + set +e + # Legacy nvidia doesn't have cuda patchelf --set-rpath $cudaPath $out/lib/libcuda.so.*.* + set -e patchelf --set-rpath $out/lib $out/lib/xorg/modules/extensions/libglx.so.*.* for i in nvidia-settings nvidia-xconfig; do diff --git a/pkgs/os-specific/linux/nvidia-x11/legacy.nix b/pkgs/os-specific/linux/nvidia-x11/legacy.nix new file mode 100644 index 000000000000..3bf5669adc42 --- /dev/null +++ b/pkgs/os-specific/linux/nvidia-x11/legacy.nix @@ -0,0 +1,45 @@ +{stdenv, fetchurl, kernel, xlibs, gtkLibs, zlib}: + +let + + versionNumber = "96.43.13"; + +in + +stdenv.mkDerivation { + name = "nvidia-x11-${versionNumber}-${kernel.version}"; + + builder = ./builder.sh; + + src = + if stdenv.system == "i686-linux" then + fetchurl { + url = "http://us.download.nvidia.com/XFree86/Linux-x86/${versionNumber}/NVIDIA-Linux-x86-${versionNumber}-pkg0.run"; + sha256 = "1l0z1qik3vy2agjq86jwcpdn8qz16j1xpzvjzaiyc9ccdskbvm87"; + } + 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 = "0xi90qc32a9im8v6j28k2kj8y4wgc3aqkjxfd3ii5jn629ba18l0"; + } + else throw "nvidia-x11 does not support platform ${stdenv.system}"; + + inherit versionNumber kernel; + + dontStrip = true; + + glPath = stdenv.lib.makeLibraryPath [xlibs.libXext xlibs.libX11 xlibs.libXrandr]; + + cudaPath = stdenv.lib.makeLibraryPath [zlib stdenv.gcc.gcc]; + + programPath = stdenv.lib.makeLibraryPath [ + gtkLibs.gtk gtkLibs.atk gtkLibs.pango gtkLibs.glib + xlibs.libXv + ]; + + meta = { + homepage = http://www.nvidia.com/object/unix.html; + description = "X.org driver and kernel module for Legacy NVIDIA graphics cards"; + license = "unfree"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4f9b6346839e..0b22b09bdab4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5448,6 +5448,10 @@ let inherit stdenv fetchurl kernel xlibs gtkLibs zlib; }; + nvidia_x11_legacy = import ../os-specific/linux/nvidia-x11/legacy.nix { + inherit stdenv fetchurl kernel xlibs gtkLibs zlib; + }; + wis_go7007 = import ../os-specific/linux/wis-go7007 { inherit fetchurl stdenv kernel ncurses fxload; };