SDL2: wayland support

This commit is contained in:
gnidorah 2017-11-01 09:36:56 +03:00 committed by Tuomas Tynkkynen
parent 1d9a8e2289
commit b0d193f596
2 changed files with 4 additions and 1 deletions

View File

@ -2,6 +2,7 @@
, openglSupport ? false, mesa_noglu
, alsaSupport ? true, alsaLib
, x11Support ? true, libICE, libXi, libXScrnSaver, libXcursor, libXinerama, libXext, libXxf86vm, libXrandr
, waylandSupport ? true, wayland, wayland-protocols, libxkbcommon
, dbusSupport ? false, dbus
, udevSupport ? false, udev
, ibusSupport ? false, ibus
@ -17,7 +18,7 @@ assert openglSupport -> (stdenv.isDarwin || mesa_noglu != null && x11Support);
let
configureFlagsFun = attrs: [
"--disable-oss" "--disable-x11-shared"
"--disable-oss" "--disable-x11-shared" "--disable-wayland-shared"
"--disable-pulseaudio-shared" "--disable-alsa-shared"
] ++ lib.optional alsaSupport "--with-alsa-prefix=${attrs.alsaLib.out}/lib"
++ lib.optional (!x11Support) "--without-x";
@ -39,6 +40,7 @@ stdenv.mkDerivation rec {
# Since `libpulse*.la' contain `-lgdbm', PulseAudio must be propagated.
propagatedBuildInputs = lib.optionals x11Support [ libICE libXi libXScrnSaver libXcursor libXinerama libXext libXrandr libXxf86vm ] ++
lib.optionals waylandSupport [ wayland wayland-protocols libxkbcommon ] ++
lib.optional pulseaudioSupport libpulseaudio;
buildInputs = [ audiofile ] ++

View File

@ -10579,6 +10579,7 @@ with pkgs;
openglSupport = mesaSupported;
alsaSupport = stdenv.isLinux;
x11Support = !stdenv.isCygwin;
waylandSupport = stdenv.isLinux;
udevSupport = stdenv.isLinux;
pulseaudioSupport = config.pulseaudio or stdenv.isLinux;
inherit (darwin.apple_sdk.frameworks) AudioUnit Cocoa CoreAudio CoreServices ForceFeedback OpenGL;