nixpkgs/pkgs/os-specific/linux/nvidia-x11/legacy304.nix

54 lines
1.7 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, kernel ? null, xorg, zlib, perl
, gtk2, 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.134"; in
stdenv.mkDerivation {
name = "nvidia-x11-${versionNumber}${optionalString (!libsOnly) "-${kernel.version}"}";
2013-01-13 14:17:43 +00:00
builder = ./builder-legacy304.sh;
src =
if stdenv.system == "i686-linux" then
fetchurl {
2016-03-10 14:56:53 +00:00
url = "http://download.nvidia.com/XFree86/Linux-x86/${versionNumber}/NVIDIA-Linux-x86-${versionNumber}.run";
sha256 = "178wx0a2pmdnaypa9pq6jh0ii0i8ykz1sh1liad9zfriy4d8kxw4";
}
else if stdenv.system == "x86_64-linux" then
fetchurl {
2016-03-10 14:56:53 +00:00
url = "http://download.nvidia.com/XFree86/Linux-x86_64/${versionNumber}/NVIDIA-Linux-x86_64-${versionNumber}-no-compat32.run";
sha256 = "0hy4q1v4y7q2jq2j963mwpjhjksqhaiing3xcla861r8rmjkf8a2";
}
else throw "nvidia-x11 does not support platform ${stdenv.system}";
inherit versionNumber libsOnly;
kernel = if libsOnly then null else kernel.dev;
hardeningDisable = [ "pic" "format" ];
dontStrip = true;
glPath = stdenv.lib.makeLibraryPath [xorg.libXext xorg.libX11 xorg.libXrandr];
cudaPath = stdenv.lib.makeLibraryPath [zlib stdenv.cc.cc];
programPath = optionalString (!libsOnly) (stdenv.lib.makeLibraryPath
[ gtk2 atk pango glib gdk_pixbuf xorg.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;
};
}