From d21b6702a3fae4c0c5003b08741f1a1d4d6c815a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 11 Jun 2015 02:17:00 +0200 Subject: [PATCH] mesa: Reduce dependency bloat In particular, don't depend on clang. It's really bad to have a core package like Mesa pull in multiple C compilers. --- pkgs/development/libraries/mesa/default.nix | 13 ++++--------- pkgs/top-level/all-packages.nix | 1 - 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 6fe65ca25df7..f2b36dd8c3e3 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, fetchpatch, pkgconfig, intltool, flex, bison, autoreconfHook, substituteAll , python, libxml2Python, file, expat, makedepend, pythonPackages , libdrm, xorg, wayland, udev, llvmPackages, libffi, libomxil-bellagio -, libvdpau, libelf, libva, libclc +, libvdpau, libelf, libva , grsecEnabled , enableTextureFloats ? false # Texture floats are patented, see docs/patents.txt , enableExtraFeatures ? false # not maintained @@ -26,7 +26,6 @@ let version = "10.5.6"; # this is the default search path for DRI drivers driverLink = "/run/opengl-driver" + stdenv.lib.optionalString stdenv.isi686 "-32"; - clang = if llvmPackages ? clang-unwrapped then llvmPackages.clang-unwrapped else llvmPackages.clang; in with { inherit (stdenv.lib) optional optionals optionalString; }; @@ -63,7 +62,6 @@ stdenv.mkDerivation { configureFlags = [ "--sysconfdir=/etc" "--localstatedir=/var" - "--with-clang-libdir=${clang}/lib" "--with-dri-driverdir=$(drivers)/lib/dri" "--with-dri-searchpath=${driverLink}/lib/dri" @@ -81,13 +79,11 @@ stdenv.mkDerivation { ++ [ "--enable-xvmc" "--enable-vdpau" - "--enable-omx" - "--enable-va" + #"--enable-omx" + #"--enable-va" # TODO: Figure out how to enable opencl without having a runtime dependency on clang "--disable-opencl" - #"--enable-opencl" - #"--enable-opencl-icd" "--with-gallium-drivers=svga,i915,ilo,r300,r600,radeonsi,nouveau,freedreno,swrast" "--enable-shared-glapi" @@ -111,8 +107,7 @@ stdenv.mkDerivation { autoreconfHook intltool expat libxml2Python llvmPackages.llvm glproto dri2proto dri3proto presentproto libX11 libXext libxcb libXt libXfixes libxshmfence - libffi wayland libvdpau libelf libXvMC libomxil-bellagio libva - libclc clang + libffi wayland libvdpau libelf libXvMC /* libomxil-bellagio libva */ ] ++ optional stdenv.isLinux udev; enableParallelBuilding = true; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5f3c48eba32d..f1e8d9e37f03 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7340,7 +7340,6 @@ let # makes it slower, but during runtime we link against just mesa_drivers # through /run/opengl-driver*, which is overriden according to config.grsecurity grsecEnabled = true; - libva = libva.override { mesa = null; }; llvmPackages = llvmPackages_36; }); mesa_glu = mesaDarwinOr (callPackage ../development/libraries/mesa-glu { });