scream: optional pcapSupport

This commit is contained in:
arcnmx 2023-04-03 09:21:46 -07:00
parent 4da422e269
commit 8b601a118f

View file

@ -2,6 +2,7 @@
, alsaSupport ? stdenv.isLinux, alsa-lib , alsaSupport ? stdenv.isLinux, alsa-lib
, pulseSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio , pulseSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio
, jackSupport ? false, libjack2, soxr , jackSupport ? false, libjack2, soxr
, pcapSupport ? false, libpcap
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -17,13 +18,15 @@ stdenv.mkDerivation rec {
buildInputs = lib.optional pulseSupport libpulseaudio buildInputs = lib.optional pulseSupport libpulseaudio
++ lib.optionals jackSupport [ libjack2 soxr ] ++ lib.optionals jackSupport [ libjack2 soxr ]
++ lib.optional alsaSupport alsa-lib; ++ lib.optional alsaSupport alsa-lib
++ lib.optional pcapSupport libpcap;
nativeBuildInputs = [ cmake pkg-config ]; nativeBuildInputs = [ cmake pkg-config ];
cmakeFlags = [ cmakeFlags = [
"-DPULSEAUDIO_ENABLE=${if pulseSupport then "ON" else "OFF"}" "-DPULSEAUDIO_ENABLE=${if pulseSupport then "ON" else "OFF"}"
"-DALSA_ENABLE=${if alsaSupport then "ON" else "OFF"}" "-DALSA_ENABLE=${if alsaSupport then "ON" else "OFF"}"
"-DJACK_ENABLE=${if jackSupport then "ON" else "OFF"}" "-DJACK_ENABLE=${if jackSupport then "ON" else "OFF"}"
"-DPCAP_ENABLE=${if pcapSupport then "ON" else "OFF"}"
]; ];
cmakeDir = "../Receivers/unix"; cmakeDir = "../Receivers/unix";