From 145380798b7e8f063d1a27c02e61057f02506911 Mon Sep 17 00:00:00 2001 From: Alyssa Date: Thu, 18 Apr 2019 11:09:05 +0200 Subject: mesa: make libomxil-bellagio optional --- nixpkgs/pkgs/development/libraries/mesa/default.nix | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'nixpkgs/pkgs/development/libraries/mesa/default.nix') diff --git a/nixpkgs/pkgs/development/libraries/mesa/default.nix b/nixpkgs/pkgs/development/libraries/mesa/default.nix index a711a67f1325..7bef61348a18 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, libdrm, xorg, wayland, wayland-protocols, openssl -, llvmPackages, libffi, libomxil-bellagio, libva-minimal +, llvmPackages, libffi, libva-minimal , libelf, libvdpau, valgrind-light, python2, python2Packages , libglvnd , enableRadv ? true @@ -9,9 +9,14 @@ , driDrivers ? null , vulkanDrivers ? null , eglPlatforms ? [ "x11" ] ++ lib.optionals stdenv.isLinux [ "wayland" "drm" ] + +, omxBellagioSupport ? stdenv.isLinux, libomxil-bellagio + , OpenGL, Xplugin }: +with lib; + /** Packaging design: - The basic mesa ($out) contains headers and libraries (GLU is in libGLU now). This or the mesa attribute (which also contains GLU) are small (~ 2 MB, mostly headers) @@ -23,8 +28,6 @@ - libOSMesa is in $osmesa (~4 MB) */ -with stdenv.lib; - if ! elem stdenv.hostPlatform.system platforms.mesaPlatforms then throw "unsupported platform for Mesa" else @@ -66,6 +69,9 @@ let else vulkan_; in +assert omxBellagioSupport -> + intersectLists galliumDrivers [ "r600" "radeonsi" "nouveau" ] != []; + let version = "18.3.4"; branch = head (splitString "." version); @@ -148,10 +154,7 @@ let self = stdenv.mkDerivation { (enableFeature (elem "x11" eglPlatforms) "vdpau") "--enable-shared-glapi" "--enable-llvm-shared-libs" - - (enableFeature (elem "x11" eglPlatforms || elem "drm" eglPlatforms) - "omx-bellagio") - + (enableFeature omxBellagioSupport "omx-bellagio") (enableFeature stdenv.isLinux "va") "--disable-opencl" @@ -174,8 +177,7 @@ let self = stdenv.mkDerivation { buildInputs = [ expat llvmPackages.llvm libglvnd libelf ] ++ optionals (elem "wayland" eglPlatforms) [ wayland wayland-protocols ] ++ optionals stdenv.isLinux [ libva-minimal ] - ++ optional (elem "x11" eglPlatforms || elem "drm" eglPlatforms) - libomxil-bellagio + ++ optional omxBellagioSupport libomxil-bellagio ++ optionals (elem "x11" eglPlatforms) ((with xorg; [ -- cgit 1.4.1