2012-02-17 15:32:28 +01:00
|
|
|
{ stdenv, fetchurl, kernel, xlibs, which, imake
|
2010-05-18 21:36:55 +02:00
|
|
|
, mesa # for fgl_glxgears
|
|
|
|
, libXxf86vm, xf86vidmodeproto # for fglrx_gamma
|
|
|
|
, xorg, makeWrapper, glibc, patchelf
|
|
|
|
}:
|
|
|
|
|
|
|
|
# If you want to use a different Xorg version probably
|
|
|
|
# DIR_DEPENDING_ON_XORG_VERSION in builder.sh has to be adopted (?)
|
|
|
|
# make sure libglx.so of ati is used. xorg.xorgserver does provide it as well
|
|
|
|
# which is a problem because it doesn't contain the xorgserver patch supporting
|
|
|
|
# the XORG_DRI_DRIVER_PATH env var.
|
|
|
|
# See http://thread.gmane.org/gmane.linux.distributions.nixos/4145 for a
|
|
|
|
# workaround (TODO)
|
|
|
|
|
|
|
|
# The gentoo ebuild contains much more magic..
|
|
|
|
|
|
|
|
# http://wiki.cchtml.com/index.php/Main_Page
|
|
|
|
|
2012-02-17 15:32:28 +01:00
|
|
|
assert stdenv.system == "x86_64-linux";
|
|
|
|
|
2010-10-26 02:35:38 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2012-02-17 15:32:28 +01:00
|
|
|
name = "ati-drivers-${version}-${kernel.version}";
|
2010-11-28 10:17:42 +01:00
|
|
|
version = "10-11-x86";
|
2010-05-18 21:36:55 +02:00
|
|
|
|
|
|
|
builder = ./builder.sh;
|
|
|
|
|
|
|
|
inherit libXxf86vm xf86vidmodeproto;
|
|
|
|
|
2012-02-17 15:32:28 +01:00
|
|
|
src = fetchurl {
|
2012-07-02 16:11:41 +02:00
|
|
|
url = https://www2.ati.com/drivers/linux/ati-driver-installer-10-11-x86.x86_64.run;
|
2010-11-28 10:17:42 +01:00
|
|
|
sha256 = "1z33w831ayx1j5lm9d1xv6whkmzsz9v8li3s8c96hwnwki6zpimr";
|
2010-05-18 21:36:55 +02:00
|
|
|
};
|
|
|
|
|
2012-02-17 15:32:28 +01:00
|
|
|
buildInputs =
|
|
|
|
[ xlibs.libXext xlibs.libX11
|
|
|
|
xlibs.libXrandr which imake makeWrapper
|
|
|
|
patchelf
|
|
|
|
];
|
|
|
|
|
2010-05-18 21:36:55 +02:00
|
|
|
inherit kernel glibc /* glibc only used for setting interpreter */;
|
|
|
|
|
2012-02-17 15:32:28 +01:00
|
|
|
LD_LIBRARY_PATH = stdenv.lib.concatStringsSep ":"
|
2010-05-18 21:36:55 +02:00
|
|
|
[ "${xorg.libXrandr}/lib"
|
|
|
|
"${xorg.libXrender}/lib"
|
|
|
|
"${xorg.libXext}/lib"
|
|
|
|
"${xorg.libX11}/lib"
|
|
|
|
];
|
|
|
|
|
|
|
|
inherit mesa; # only required to build examples
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "ati drivers";
|
|
|
|
homepage = http://support.amd.com/us/gpudownload/Pages/index.aspx;
|
|
|
|
license = "unfree";
|
|
|
|
maintainers = [stdenv.lib.maintainers.marcweber];
|
2010-05-25 13:27:18 +02:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2010-05-18 21:36:55 +02:00
|
|
|
};
|
2010-05-19 12:01:07 +02:00
|
|
|
|
|
|
|
# moved assertions here because the name is evaluated when the NixOS manual is generated
|
|
|
|
# Don't make that fail - fail lazily when a users tries to build this derivation only
|
|
|
|
dummy =
|
2010-08-18 16:45:13 +02:00
|
|
|
# assert xorg.xorgserver.name == "xorg-server-1.7.5";
|
2010-05-19 12:01:07 +02:00
|
|
|
assert stdenv.system == "x86_64-linux"; # i686-linux should work as well - however I didn't test it.
|
|
|
|
null;
|
|
|
|
|
2010-05-18 21:36:55 +02:00
|
|
|
}
|