From fbfcc9fa1c426725f78b2c23a70d9b3453066abf Mon Sep 17 00:00:00 2001 From: Alyssa Date: Thu, 18 Apr 2019 14:18:24 +0200 Subject: mesa: make LLVM support optional zlib appears to be propagated by llvm, as mesa can't find it when not given LLVM. --- nixpkgs/pkgs/development/libraries/mesa/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/nixpkgs/pkgs/development/libraries/mesa/default.nix b/nixpkgs/pkgs/development/libraries/mesa/default.nix index d54c19f8380c..f9d022eb3602 100644 --- a/nixpkgs/pkgs/development/libraries/mesa/default.nix +++ b/nixpkgs/pkgs/development/libraries/mesa/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, fetchpatch, lib , pkgconfig, intltool, autoreconfHook -, file, expat, xorg, wayland, wayland-protocols, openssl -, llvmPackages, libffi +, file, expat, zlib, xorg, wayland, wayland-protocols, openssl +, libffi , valgrind-light, python2, python2Packages , libglvnd , enableRadv ? stdenv.isLinux @@ -16,6 +16,7 @@ , vaSupport ? stdenv.isLinux, libva-minimal , libdrmSupport ? stdenv.isLinux, libdrm , libelfSupport ? stdenv.isLinux, libelf +, llvmSupport ? true, llvmPackages , OpenGL, Xplugin }: @@ -26,7 +27,7 @@ assert elem "drm" eglPlatforms -> libdrmSupport; assert elem "wayland" eglPlatforms -> libdrmSupport; assert xvmcSupport -> elem "x11" eglPlatforms; assert vdpauSupport -> elem "x11" eglPlatforms; -assert enableRadv -> libdrmSupport && libelfSupport; +assert enableRadv -> libdrmSupport && llvmSupport && libelfSupport; /** Packaging design: - The basic mesa ($out) contains headers and libraries (GLU is in libGLU now). @@ -169,7 +170,7 @@ let self = stdenv.mkDerivation { (enableFeature (!stdenv.hostPlatform.isMusl) "glx-tls") # used by wine (enableFeature (elem "swrast" galliumDrivers) "gallium-osmesa") - "--enable-llvm" + (enableFeature llvmSupport "llvm") (enableFeature stdenv.isLinux "egl") # used in vmware driver @@ -200,7 +201,8 @@ let self = stdenv.mkDerivation { ++ optional libdrmSupport libdrm ++ optionals stdenv.isDarwin [ OpenGL Xplugin ]; - buildInputs = [ expat llvmPackages.llvm libglvnd ] + buildInputs = [ expat zlib libglvnd ] + ++ optional llvmSupport llvmPackages.llvm ++ optional libelfSupport libelf ++ optionals (elem "wayland" eglPlatforms) [ wayland wayland-protocols ] ++ optional xvmcSupport xorg.libXvMC -- cgit 1.4.1