2007-11-06 00:59:55 +01:00
|
|
|
{stdenv, fetchurl, pkgconfig, x11, xlibs, libdrm}:
|
2004-06-09 19:53:30 +02:00
|
|
|
|
2007-02-27 01:18:34 +01: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 16:49:28 +02:00
|
|
|
abort "unsupported platform for Mesa"; # !!! change to throw, remove all the mesa asserts in all-packages.nix
|
2007-02-27 01:18:34 +01:00
|
|
|
|
2008-03-01 18:44:50 +01:00
|
|
|
# Missing file in 7.0.2. Can be removed for >= 7.0.3.
|
|
|
|
missingPC = fetchurl {
|
|
|
|
url = "http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/media-libs/mesa/files/7.0.2-glw.pc.in?rev=1.1";
|
|
|
|
sha256 = "1z4d50pllwi8g6n567dk3zxq4qmam79n72wr55mdqx0jrdj4fj0v";
|
|
|
|
};
|
|
|
|
|
2007-02-27 01:18:34 +01:00
|
|
|
in
|
2004-06-09 19:53:30 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2008-03-01 18:44:50 +01:00
|
|
|
name = "mesa-7.0.2";
|
2007-11-06 00:59:55 +01:00
|
|
|
|
2007-02-26 18:05:27 +01:00
|
|
|
src = fetchurl {
|
2008-03-01 18:44:50 +01:00
|
|
|
url = mirror://sourceforge/mesa3d/MesaLib-7.0.2.tar.bz2;
|
|
|
|
md5 = "93e6ed7924ff069a4f883b4fce5349dc";
|
2007-02-26 18:05:27 +01:00
|
|
|
};
|
2005-11-02 21:58:38 +01:00
|
|
|
/* (fetchurl {
|
2006-01-30 17:04:03 +01:00
|
|
|
url = http://nix.cs.uu.nl/dist/tarballs/MesaGLUT-6.4.tar.bz2;
|
2005-11-02 21:58:38 +01:00
|
|
|
md5 = "1a8c4d4fc699233f5fdb902b8753099e";
|
2004-06-09 19:53:30 +02:00
|
|
|
})
|
2005-11-02 21:58:38 +01:00
|
|
|
(fetchurl {
|
2006-01-30 17:04:03 +01:00
|
|
|
url = http://nix.cs.uu.nl/dist/tarballs/MesaDemos-6.4.tar.bz2;
|
2005-11-02 21:58:38 +01:00
|
|
|
md5 = "1a8c4d4fc699233f5fdb902b8753099e";
|
|
|
|
}) */
|
2007-11-06 00:59:55 +01:00
|
|
|
|
|
|
|
buildFlags = "${target}";
|
|
|
|
|
|
|
|
preBuild = "
|
|
|
|
makeFlagsArray=(INSTALL_DIR=$out DRI_DRIVER_INSTALL_DIR=$out/lib/modules/dri SHELL=$SHELL)
|
2008-03-01 18:44:50 +01:00
|
|
|
cp ${missingPC} src/glw/glw.pc.in
|
2007-11-06 00:59:55 +01:00
|
|
|
";
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
pkgconfig x11 xlibs.makedepend libdrm xlibs.glproto xlibs.libXmu
|
|
|
|
xlibs.libXi xlibs.libXxf86vm xlibs.libXfixes xlibs.libXdamage
|
|
|
|
];
|
|
|
|
|
2007-08-21 02:00:23 +02:00
|
|
|
passthru = {inherit libdrm;};
|
2007-11-06 00:59:55 +01:00
|
|
|
|
|
|
|
meta = {
|
2008-03-01 18:44:50 +01:00
|
|
|
description = "An open source implementation of OpenGL";
|
2007-11-06 00:59:55 +01:00
|
|
|
homepage = http://www.mesa3d.org/;
|
|
|
|
};
|
2004-06-09 19:53:30 +02:00
|
|
|
}
|