diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix index e1506239f457..0872558d0f40 100644 --- a/pkgs/applications/networking/browsers/firefox/common.nix +++ b/pkgs/applications/networking/browsers/firefox/common.nix @@ -80,11 +80,13 @@ , alsaSupport ? stdenv.isLinux, alsa-lib , ffmpegSupport ? true , gssSupport ? true, libkrb5 +, jackSupport ? stdenv.isLinux, libjack2 , jemallocSupport ? true, jemalloc , ltoSupport ? (stdenv.isLinux && stdenv.is64bit), overrideCC, buildPackages , pgoSupport ? (stdenv.isLinux && stdenv.isx86_64 && stdenv.hostPlatform == stdenv.buildPlatform), xvfb-run , pipewireSupport ? waylandSupport && webrtcSupport , pulseaudioSupport ? stdenv.isLinux, libpulseaudio +, sndioSupport ? stdenv.isLinux, sndio , waylandSupport ? true, libxkbcommon, libdrm ## privacy-related options @@ -303,7 +305,9 @@ buildStdenv.mkDerivation ({ ++ lib.optional (lib.versionAtLeast version "95") "--with-wasi-sysroot=${wasiSysRoot}" ++ flag alsaSupport "alsa" + ++ flag jackSupport "jack" ++ flag pulseaudioSupport "pulseaudio" + ++ lib.optional (lib.versionAtLeast version "100") (flag sndioSupport "sndio") ++ flag ffmpegSupport "ffmpeg" ++ flag jemallocSupport "jemalloc" ++ flag geolocationSupport "necko-wifi" @@ -363,7 +367,9 @@ buildStdenv.mkDerivation ({ ] ++ [ (if (lib.versionAtLeast version "92") then nss_latest else nss_esr) ] ++ lib.optional alsaSupport alsa-lib + ++ lib.optional jackSupport libjack2 ++ lib.optional pulseaudioSupport libpulseaudio # only headers are needed + ++ lib.optional (sndioSupport && lib.versionAtLeast version "100") sndio ++ lib.optional gssSupport libkrb5 ++ lib.optionals waylandSupport [ libxkbcommon libdrm ] ++ lib.optional jemallocSupport jemalloc @@ -464,7 +470,9 @@ buildStdenv.mkDerivation ({ inherit version; inherit alsaSupport; inherit binaryName; + inherit jackSupport; inherit pipewireSupport; + inherit sndioSupport; inherit nspr; inherit ffmpegSupport; inherit gssSupport; diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix index d5055f04ed82..08cd6b4a7992 100644 --- a/pkgs/applications/networking/browsers/firefox/wrapper.nix +++ b/pkgs/applications/networking/browsers/firefox/wrapper.nix @@ -13,6 +13,8 @@ , mesa # firefox wants gbm for drm+dmabuf , cups , pciutils +, sndio +, libjack2 }: ## configurability of the wrapper itself @@ -53,6 +55,8 @@ let gssSupport = browser.gssSupport or false; alsaSupport = browser.alsaSupport or false; pipewireSupport = browser.pipewireSupport or false; + sndioSupport = browser.sndioSupport or false; + jackSupport = browser.jackSupport or false; # PCSC-Lite daemon (services.pcscd) also must be enabled for firefox to access smartcards smartcardSupport = cfg.smartcardSupport or false; @@ -76,6 +80,8 @@ let (with xorg; [ stdenv.cc libX11 libXxf86dga libXxf86vm libXext libXt alsa-lib zlib ]) ++ lib.optional (config.pulseaudio or true) libpulseaudio ++ lib.optional alsaSupport alsa-lib + ++ lib.optional sndioSupport sndio + ++ lib.optional jackSupport libjack2 ++ lib.optional smartcardSupport opensc ++ pkcs11Modules; gtk_modules = [ libcanberra-gtk3 ];