SDL2: add pipewire & libdecor support

Co-authored-by: jakobrs <jakobrs100@gmail.com>
This commit is contained in:
Zack A 2021-10-29 05:36:54 -07:00 committed by Sandro Jäckel
parent acc1ac4535
commit baee63f5e1
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5
3 changed files with 19 additions and 4 deletions

View file

@ -31,6 +31,10 @@
, ibus
, fcitxSupport ? false
, fcitx
, libdecorSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid
, libdecor
, pipewireSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid
, pipewire # NOTE: must be built with SDL2 without pipewire support
, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux && !stdenv.hostPlatform.isAndroid
, libpulseaudio
, AudioUnit
@ -75,6 +79,8 @@ stdenv.mkDerivation rec {
dlopenBuildInputs = optionals alsaSupport [ alsa-lib audiofile ]
++ optional dbusSupport dbus
++ optional libdecorSupport libdecor
++ optional pipewireSupport pipewire
++ optional pulseaudioSupport libpulseaudio
++ optional udevSupport udev
++ optionals waylandSupport [ wayland wayland-protocols libxkbcommon ]

View file

@ -20,7 +20,6 @@
, udev
, libva
, libsndfile
, SDL2
, vulkan-headers
, vulkan-loader
, webrtc-audio-processing
@ -129,7 +128,6 @@ let
vulkan-headers
vulkan-loader
webrtc-audio-processing
SDL2
systemd
] ++ lib.optionals gstreamerSupport [ gst_all_1.gst-plugins-base gst_all_1.gstreamer ]
++ lib.optionals libcameraSupport [ libcamera libdrm ]
@ -139,7 +137,7 @@ let
++ lib.optional zeroconfSupport avahi
++ lib.optional raopSupport openssl
++ lib.optional rocSupport roc-toolkit
++ lib.optionals x11Support [ libcanberra xorg.libxcb ];
++ lib.optionals x11Support [ libcanberra xorg.libX11 ];
# Valgrind binary is required for running one optional test.
checkInputs = lib.optional withValgrind valgrind;
@ -169,6 +167,7 @@ let
"-Dsession-managers="
"-Dvulkan=enabled"
"-Dx11=${mesonEnableFeature x11Support}"
"-Dsdl2=disabled" # required only to build examples, causes dependency loop
];
# Fontconfig error: Cannot load default config file

View file

@ -13962,8 +13962,18 @@ with pkgs;
pipenv = callPackage ../development/tools/pipenv {};
pipewire = callPackage ../development/libraries/pipewire {};
pipewire = callPackage ../development/libraries/pipewire {
# ffmpeg depends on SDL2 which depends on pipewire by default.
# Break the cycle by disabling pipewire support in our ffmpeg.
ffmpeg = ffmpeg.override {
SDL2 = SDL2.override {
pipewireSupport = false;
};
};
};
pipewire-media-session = callPackage ../development/libraries/pipewire/media-session.nix {};
pipewire_0_2 = callPackage ../development/libraries/pipewire/0.2.nix {};
wireplumber = callPackage ../development/libraries/pipewire/wireplumber.nix {};