nixpkgs/pkgs/os-specific/linux/nvidia/default.nix
Eelco Dolstra 378a5c46d2 * nvidia-x11 177.80.
svn path=/nixpkgs/trunk/; revision=12998
2008-10-08 12:45:39 +00:00

44 lines
1.3 KiB
Nix

{stdenv, fetchurl, kernel, xlibs, gtkLibs, zlib}:
let
versionNumber = "177.80";
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}-pkg1.run";
sha256 = "1z6z4dzhl2zmnwywaxbn2nf7lf72whjn7ffasdkb9217d5099wh7";
}
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}-pkg2.run";
sha256 = "1kx1kpc5flbsy9h1ii8al8cwzmvlfg4ymr6hvqsanxcdarq1sz47";
}
else throw "nvidia-x11 does not support platform ${stdenv.system}";
inherit versionNumber kernel;
dontStrip = true;
glPath = stdenv.lib.makeLibraryPath [xlibs.libXext xlibs.libX11];
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 NVIDIA graphics cards";
};
}