nixpkgs/pkgs/os-specific/linux/nvidia-x11/legacy304.nix
Vladimír Čunát 88c9f8b574 xlibs: replace occurrences by xorg
This seems to have been confusing people, using both xlibs and xorg, etc.
- Avoided renaming local (and different) xlibs binding in gcc*.
- Fixed cases where both xorg and xlibs were used.
Hopefully everything still works as before.
2015-09-15 12:54:34 +02:00

54 lines
1.7 KiB
Nix

{ stdenv, fetchurl, kernel ? null, xorg, 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 [xorg.libXext xorg.libX11 xorg.libXrandr];
cudaPath = stdenv.lib.makeLibraryPath [zlib stdenv.cc.cc];
programPath = optionalString (!libsOnly) (stdenv.lib.makeLibraryPath
[ gtk 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;
};
}