2007-11-05 23:59:55 +00:00
|
|
|
{stdenv, fetchurl, pkgconfig, x11, xlibs, libdrm}:
|
2004-06-09 17:53:30 +00:00
|
|
|
|
2007-02-27 00:18:34 +00:00
|
|
|
let
|
|
|
|
|
|
|
|
target =
|
|
|
|
if stdenv.system == "i686-linux" then "linux-dri-x86" else
|
|
|
|
if stdenv.system == "x86_64-linux" then "linux-dri-x86-64" else
|
2007-05-16 14:49:28 +00:00
|
|
|
abort "unsupported platform for Mesa"; # !!! change to throw, remove all the mesa asserts in all-packages.nix
|
2007-02-27 00:18:34 +00:00
|
|
|
|
|
|
|
in
|
2004-06-09 17:53:30 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2007-11-05 23:59:55 +00:00
|
|
|
name = "mesa-7.0.1";
|
|
|
|
|
2007-02-26 17:05:27 +00:00
|
|
|
src = fetchurl {
|
2007-11-05 23:59:55 +00:00
|
|
|
url = mirror://sourceforge/mesa3d/MesaLib-7.0.1.tar.bz2;
|
|
|
|
md5 = "c056abd763e899114bf745c9eedbf9ad";
|
2007-02-26 17:05:27 +00:00
|
|
|
};
|
2005-11-02 20:58:38 +00:00
|
|
|
/* (fetchurl {
|
2006-01-30 16:04:03 +00:00
|
|
|
url = http://nix.cs.uu.nl/dist/tarballs/MesaGLUT-6.4.tar.bz2;
|
2005-11-02 20:58:38 +00:00
|
|
|
md5 = "1a8c4d4fc699233f5fdb902b8753099e";
|
2004-06-09 17:53:30 +00:00
|
|
|
})
|
2005-11-02 20:58:38 +00:00
|
|
|
(fetchurl {
|
2006-01-30 16:04:03 +00:00
|
|
|
url = http://nix.cs.uu.nl/dist/tarballs/MesaDemos-6.4.tar.bz2;
|
2005-11-02 20:58:38 +00:00
|
|
|
md5 = "1a8c4d4fc699233f5fdb902b8753099e";
|
|
|
|
}) */
|
2007-11-05 23:59:55 +00:00
|
|
|
|
|
|
|
buildFlags = "${target}";
|
|
|
|
|
|
|
|
preBuild = "
|
|
|
|
makeFlagsArray=(INSTALL_DIR=$out DRI_DRIVER_INSTALL_DIR=$out/lib/modules/dri SHELL=$SHELL)
|
|
|
|
";
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
pkgconfig x11 xlibs.makedepend libdrm xlibs.glproto xlibs.libXmu
|
|
|
|
xlibs.libXi xlibs.libXxf86vm xlibs.libXfixes xlibs.libXdamage
|
|
|
|
];
|
|
|
|
|
2007-08-21 00:00:23 +00:00
|
|
|
passthru = {inherit libdrm;};
|
2007-11-05 23:59:55 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "OpenGL-compatible 3D library. Supports acceleration.";
|
|
|
|
homepage = http://www.mesa3d.org/;
|
|
|
|
};
|
2004-06-09 17:53:30 +00:00
|
|
|
}
|