2013-03-24 11:45:00 +00:00
|
|
|
{ stdenv, fetchurl, kernelDev ? null, xlibs, zlib, perl
|
2012-03-14 21:57:32 +00:00
|
|
|
, gtk, atk, pango, glib, gdk_pixbuf
|
2010-05-30 22:56:56 +01:00
|
|
|
, # Whether to build the libraries only (i.e. not the kernel module or
|
|
|
|
# nvidia-settings). Used to support 32-bit binaries on 64-bit
|
|
|
|
# Linux.
|
|
|
|
libsOnly ? false
|
|
|
|
}:
|
2007-05-28 15:10:46 +01:00
|
|
|
|
2010-05-30 22:56:56 +01:00
|
|
|
with stdenv.lib;
|
2007-07-12 12:52:34 +01:00
|
|
|
|
2013-07-17 10:10:21 +01:00
|
|
|
let
|
2008-01-07 22:54:30 +00:00
|
|
|
|
2013-10-02 12:36:57 +01:00
|
|
|
versionNumber = "319.60";
|
2013-08-26 21:55:14 +01:00
|
|
|
|
2013-07-17 10:10:21 +01:00
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2013-03-24 11:45:00 +00:00
|
|
|
name = "nvidia-x11-${versionNumber}${optionalString (!libsOnly) "-${kernelDev.version}"}";
|
2012-09-13 15:23:34 +01:00
|
|
|
|
2007-05-28 15:10:46 +01:00
|
|
|
builder = ./builder.sh;
|
2012-09-13 15:23:34 +01:00
|
|
|
|
2013-07-17 10:10:21 +01:00
|
|
|
patches =
|
|
|
|
[ ./version-test.patch ]
|
2013-11-04 22:31:08 +00:00
|
|
|
++ optional (!libsOnly && versionAtLeast kernelDev.version "3.11") ./nvidia-drivers-linux-3.11-incremental.patch;
|
2013-02-06 09:46:25 +00:00
|
|
|
|
2008-06-12 15:04:06 +01:00
|
|
|
src =
|
|
|
|
if stdenv.system == "i686-linux" then
|
|
|
|
fetchurl {
|
2010-07-18 21:21:18 +01:00
|
|
|
url = "http://us.download.nvidia.com/XFree86/Linux-x86/${versionNumber}/NVIDIA-Linux-x86-${versionNumber}.run";
|
2013-10-02 12:36:57 +01:00
|
|
|
sha256 = "0kjidkwd2b5aik74663mxk3ffq4a3fmaybq2aq1lcbfhvvh49j6j";
|
2008-06-12 15:04:06 +01:00
|
|
|
}
|
|
|
|
else if stdenv.system == "x86_64-linux" then
|
|
|
|
fetchurl {
|
2010-07-18 21:21:18 +01:00
|
|
|
url = "http://us.download.nvidia.com/XFree86/Linux-x86_64/${versionNumber}/NVIDIA-Linux-x86_64-${versionNumber}-no-compat32.run";
|
2013-10-02 12:36:57 +01:00
|
|
|
sha256 = "0fhrxcfsw2jaycnz9gr04c9w585wydx8kpm6rjjbw19wkf8hlq3z";
|
2008-06-12 15:04:06 +01:00
|
|
|
}
|
|
|
|
else throw "nvidia-x11 does not support platform ${stdenv.system}";
|
2008-05-29 14:22:12 +01:00
|
|
|
|
2010-05-30 22:56:56 +01:00
|
|
|
inherit versionNumber libsOnly;
|
|
|
|
|
2013-03-24 11:45:00 +00:00
|
|
|
kernel = if libsOnly then null else kernelDev;
|
2007-05-28 15:10:46 +01:00
|
|
|
|
2008-03-04 10:06:21 +00:00
|
|
|
dontStrip = true;
|
|
|
|
|
2009-06-16 13:51:35 +01:00
|
|
|
glPath = stdenv.lib.makeLibraryPath [xlibs.libXext xlibs.libX11 xlibs.libXrandr];
|
2008-06-04 10:59:33 +01:00
|
|
|
|
|
|
|
cudaPath = stdenv.lib.makeLibraryPath [zlib stdenv.gcc.gcc];
|
|
|
|
|
2013-02-01 12:57:59 +00:00
|
|
|
openclPath = stdenv.lib.makeLibraryPath [zlib];
|
|
|
|
|
2010-05-30 22:56:56 +01:00
|
|
|
programPath = optionalString (!libsOnly) (stdenv.lib.makeLibraryPath
|
2012-03-14 21:57:32 +00:00
|
|
|
[ gtk atk pango glib gdk_pixbuf xlibs.libXv ] );
|
2008-08-07 17:47:08 +01:00
|
|
|
|
2009-12-18 11:36:36 +00:00
|
|
|
buildInputs = [ perl ];
|
|
|
|
|
2008-08-07 17:47:08 +01:00
|
|
|
meta = {
|
|
|
|
homepage = http://www.nvidia.com/object/unix.html;
|
|
|
|
description = "X.org driver and kernel module for NVIDIA graphics cards";
|
2013-03-24 21:47:12 +00:00
|
|
|
license = stdenv.lib.licenses.unfreeRedistributable;
|
2013-11-04 22:31:08 +00:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
hydraPlatforms = [];
|
2008-08-07 17:47:08 +01:00
|
|
|
};
|
2007-05-28 15:10:46 +01:00
|
|
|
}
|