diff options
author | Alyssa <hi@alyssa.is> | 2019-04-18 11:09:05 +0200 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-04-23 09:58:35 +0000 |
commit | 145380798b7e8f063d1a27c02e61057f02506911 (patch) | |
tree | 8dd73ffa48346bda3657cc5eb1da7ec5568f7f17 /nixpkgs/pkgs/development/libraries/mesa/default.nix | |
parent | 66b16d19af512e8684c92b687f45eaf7788c57bd (diff) | |
download | nixlib-145380798b7e8f063d1a27c02e61057f02506911.tar nixlib-145380798b7e8f063d1a27c02e61057f02506911.tar.gz nixlib-145380798b7e8f063d1a27c02e61057f02506911.tar.bz2 nixlib-145380798b7e8f063d1a27c02e61057f02506911.tar.lz nixlib-145380798b7e8f063d1a27c02e61057f02506911.tar.xz nixlib-145380798b7e8f063d1a27c02e61057f02506911.tar.zst nixlib-145380798b7e8f063d1a27c02e61057f02506911.zip |
mesa: make libomxil-bellagio optional
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/mesa/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/mesa/default.nix | 20 |
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; [ |