forked from mirrors/nixpkgs
Add mesa 9.0.x and corresponding libdrm.
I took most of the changes from falsifian's repo, but I want to keep mesa 9.0 as a separate expression. For now I added wayland as a mandatory dependency, will have to fix that.
This commit is contained in:
parent
4b87cc9583
commit
5e5b676b4d
33
pkgs/development/libraries/libdrm/2.4.39.nix
Normal file
33
pkgs/development/libraries/libdrm/2.4.39.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ stdenv, fetchurl, pkgconfig, libpthreadstubs, libpciaccess, udev }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libdrm-2.4.39";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://dri.freedesktop.org/libdrm/${name}.tar.bz2";
|
||||
sha256 = "0gbk598li3nlyjvyqilg931i4yy7skp1rs7d2v54nl40i4w1fsrq";
|
||||
};
|
||||
|
||||
buildNativeInputs = [ pkgconfig ];
|
||||
buildInputs = [ libpthreadstubs libpciaccess udev ];
|
||||
|
||||
patches = stdenv.lib.optional stdenv.isDarwin ./libdrm-apple.patch;
|
||||
|
||||
preConfigure = stdenv.lib.optionalString stdenv.isDarwin
|
||||
"echo : \\\${ac_cv_func_clock_gettime=\'yes\'} > config.cache";
|
||||
|
||||
configureFlags = [ "--enable-nouveau-experimental-api"
|
||||
"--enable-radeon-experimental-api"
|
||||
"--enable-udev" ]
|
||||
++ stdenv.lib.optional stdenv.isDarwin "-C";
|
||||
|
||||
crossAttrs.configureFlags = configureFlags ++ [ "--disable-intel" ];
|
||||
|
||||
meta = {
|
||||
homepage = http://dri.freedesktop.org/libdrm/;
|
||||
description = "Library for accessing the kernel's Direct Rendering Manager";
|
||||
license = "bsd";
|
||||
maintainers = [ stdenv.lib.maintainers.urkud ];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
};
|
||||
}
|
50
pkgs/development/libraries/mesa/9.0.x.nix
Normal file
50
pkgs/development/libraries/mesa/9.0.x.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{ stdenv, fetchurl, autoconf, automake, autoreconfHook, libtool
|
||||
, flex, bison, pkgconfig, libdrm2_4_39, file, expat, makedepend, llvm
|
||||
, libXxf86vm, libXfixes, libXdamage, glproto, dri2proto, libX11, libxcb, libXext
|
||||
, libXt, udev, enableTextureFloats ? false
|
||||
, python, libxml2Python, wayland }:
|
||||
|
||||
if ! stdenv.lib.lists.elem stdenv.system stdenv.lib.platforms.mesaPlatforms then
|
||||
throw "unsupported platform for Mesa"
|
||||
else
|
||||
|
||||
let version = "9.0.1"; in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "mesa-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "ftp://ftp.freedesktop.org/pub/mesa/${version}/MesaLib-${version}.tar.bz2";
|
||||
md5 = "97d6554c05ea7449398afe3a0ede7018";
|
||||
};
|
||||
|
||||
patches =
|
||||
stdenv.lib.optional (stdenv.system == "mips64el-linux") ./mips_wmb.patch;
|
||||
|
||||
prePatch = "patchShebangs .";
|
||||
|
||||
configureFlags =
|
||||
" --enable-gles1 --enable-gles2 --disable-gallium-egl"
|
||||
+ " --with-egl-platforms=x11,wayland,drm --enable-gbm --enable-shared-glapi"
|
||||
+ " --with-gallium-drivers=i915,nouveau,r600,svga,swrast"
|
||||
# Texture floats are patented, see docs/patents.txt
|
||||
+ stdenv.lib.optionalString enableTextureFloats " --enable-texture-float";
|
||||
|
||||
buildInputs = [ autoconf automake autoreconfHook libtool
|
||||
expat libdrm2_4_39 libXxf86vm libXfixes libXdamage glproto dri2proto llvm
|
||||
libxml2Python libX11 libXext libxcb libXt udev wayland ];
|
||||
|
||||
buildNativeInputs = [ pkgconfig python makedepend file flex bison ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru = { inherit libdrm2_4_39; };
|
||||
|
||||
meta = {
|
||||
description = "An open source implementation of OpenGL";
|
||||
homepage = http://www.mesa3d.org/;
|
||||
license = "bsd";
|
||||
platforms = stdenv.lib.platforms.mesaPlatforms;
|
||||
maintainers = [ stdenv.lib.maintainers.simons ];
|
||||
};
|
||||
}
|
|
@ -4126,6 +4126,11 @@ let
|
|||
inherit (xorg) libpthreadstubs;
|
||||
};
|
||||
|
||||
libdrm2_4_39 = callPackage ../development/libraries/libdrm/2.4.39.nix {
|
||||
inherit fetchurl stdenv pkgconfig;
|
||||
inherit (xorg) libpthreadstubs;
|
||||
};
|
||||
|
||||
libdv = callPackage ../development/libraries/libdv { };
|
||||
|
||||
libdvbpsi = callPackage ../development/libraries/libdvbpsi { };
|
||||
|
@ -4535,6 +4540,8 @@ let
|
|||
|
||||
mesa = callPackage ../development/libraries/mesa { };
|
||||
|
||||
mesa90x = callPackage ../development/libraries/mesa/9.0.x.nix { };
|
||||
|
||||
metaEnvironment = recurseIntoAttrs (let callPackage = newScope pkgs.metaEnvironment; in rec {
|
||||
sdfLibrary = callPackage ../development/libraries/sdf-library { aterm = aterm28; };
|
||||
toolbuslib = callPackage ../development/libraries/toolbuslib { aterm = aterm28; inherit (windows) w32api; };
|
||||
|
|
Loading…
Reference in a new issue