about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/mesa/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/mesa/default.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/mesa/default.nix20
1 files changed, 11 insertions, 9 deletions
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; [