nixpkgs/pkgs/os-specific/linux/nvidia-x11/legacy304.nix
Vladimír Čunát e2e21ef320 nvidia-x11-legacy{340,304}: fix build with linux-3.18
Close #9218.
It's our default kernel (now and for the upcoming release).
- 304 won't build with 4.1,
- 173 didn't even build with 3.14 due to other issues (3.12 is OK ATM)
- all legacy drivers are up-to-date with upstream releases.
2015-08-13 14:11:06 +02:00

54 lines
1.7 KiB
Nix

{ stdenv, fetchurl, kernel ? null, xlibs, zlib, perl
, gtk, atk, pango, glib, gdk_pixbuf
, # 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
}:
with stdenv.lib;
let versionNumber = "304.125"; in
stdenv.mkDerivation {
name = "nvidia-x11-${versionNumber}${optionalString (!libsOnly) "-${kernel.version}"}";
builder = ./builder-legacy304.sh;
patches = [ ./nvidia-340.76-kernel-4.0.patch ];
src =
if stdenv.system == "i686-linux" then
fetchurl {
url = "http://us.download.nvidia.com/XFree86/Linux-x86/${versionNumber}/NVIDIA-Linux-x86-${versionNumber}.run";
sha256 = "1xy4g3yc73mb932cfr25as648k12sxpyymppb8nia3lijakv7idf";
}
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}-no-compat32.run";
sha256 = "08p6hikn7pbfg0apnsbaqyyh2s9m5r0ckqzgjvxirn5qcyll0g5a";
}
else throw "nvidia-x11 does not support platform ${stdenv.system}";
inherit versionNumber libsOnly;
kernel = if libsOnly then null else kernel.dev;
dontStrip = true;
glPath = stdenv.lib.makeLibraryPath [xlibs.libXext xlibs.libX11 xlibs.libXrandr];
cudaPath = stdenv.lib.makeLibraryPath [zlib stdenv.cc.cc];
programPath = optionalString (!libsOnly) (stdenv.lib.makeLibraryPath
[ gtk atk pango glib gdk_pixbuf xlibs.libXv ] );
buildInputs = [ perl ];
meta = {
homepage = http://www.nvidia.com/object/unix.html;
description = "X.org driver and kernel module for NVIDIA graphics cards";
license = stdenv.lib.licenses.unfree;
};
}