From 841a9ed72aad6977f5ddf8292d9bdeec1ab5b31f Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sat, 20 Apr 2019 20:02:28 +0200 Subject: mesa: make libvdpau support optional --- nixpkgs/pkgs/development/libraries/mesa/default.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 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 984ffe06febc..a438b4a748c3 100644 --- a/nixpkgs/pkgs/development/libraries/mesa/default.nix +++ b/nixpkgs/pkgs/development/libraries/mesa/default.nix @@ -2,7 +2,7 @@ , pkgconfig, intltool, autoreconfHook , file, expat, libdrm, xorg, wayland, wayland-protocols, openssl , llvmPackages, libffi -, libelf, libvdpau, valgrind-light, python2, python2Packages +, libelf, valgrind-light, python2, python2Packages , libglvnd , enableRadv ? true , galliumDrivers ? null @@ -10,6 +10,7 @@ , vulkanDrivers ? null , eglPlatforms ? [ "x11" ] ++ lib.optionals stdenv.isLinux [ "wayland" "drm" ] +, vdpauSupport ? true, libvdpau , omxBellagioSupport ? stdenv.isLinux, libomxil-bellagio , vaSupport ? stdenv.isLinux, libva-minimal @@ -18,6 +19,8 @@ with lib; +assert vdpauSupport -> elem "x11" eglPlatforms; + /** 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) @@ -74,6 +77,8 @@ assert omxBellagioSupport -> intersectLists galliumDrivers [ "r600" "radeonsi" "nouveau" ] != []; assert vaSupport -> intersectLists galliumDrivers [ "r600" "radeonsi" "nouveau" ] != []; +assert vdpauSupport -> + intersectLists galliumDrivers [ "r300" "r600" "radeonsi" "nouveau" ] != []; let version = "18.3.4"; @@ -154,7 +159,7 @@ let self = stdenv.mkDerivation { (enableFeature stdenv.isLinux "gbm") (enableFeature (elem "x11" eglPlatforms) "xvmc") - (enableFeature (elem "x11" eglPlatforms) "vdpau") + (enableFeature vdpauSupport "vdpau") "--enable-shared-glapi" "--enable-llvm-shared-libs" (enableFeature omxBellagioSupport "omx-bellagio") @@ -179,6 +184,7 @@ let self = stdenv.mkDerivation { buildInputs = [ expat llvmPackages.llvm libglvnd libelf ] ++ optionals (elem "wayland" eglPlatforms) [ wayland wayland-protocols ] + ++ optional vdpauSupport libvdpau ++ optional vaSupport libva-minimal ++ optional omxBellagioSupport libomxil-bellagio @@ -186,7 +192,7 @@ let self = stdenv.mkDerivation { ((with xorg; [ xorgproto libX11 libXext libxcb libXt libXfixes libxshmfence libXrandr - libffi libvdpau libXvMC + libffi libXvMC libpthreadstubs openssl /*or another sha1 provider*/ ]) ++ optional stdenv.isLinux valgrind-light); -- cgit 1.4.1