diff --git a/pkgs/development/libraries/libdrm/2.4.39.nix b/pkgs/development/libraries/libdrm/2.4.39.nix new file mode 100644 index 000000000000..4d05c25955d8 --- /dev/null +++ b/pkgs/development/libraries/libdrm/2.4.39.nix @@ -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; + }; +} diff --git a/pkgs/development/libraries/mesa/9.0.x.nix b/pkgs/development/libraries/mesa/9.0.x.nix new file mode 100644 index 000000000000..97874a258f56 --- /dev/null +++ b/pkgs/development/libraries/mesa/9.0.x.nix @@ -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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cf10695d24b9..fa6ba6575480 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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; };