Merge pull request #224493 from arcnmx/scream-features

This commit is contained in:
Artturi 2023-04-03 22:56:56 +03:00 committed by GitHub
commit fc46a9d1e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,8 @@
{ stdenv, lib, config, fetchFromGitHub, cmake, pkg-config { stdenv, lib, config, fetchFromGitHub, cmake, pkg-config
, 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 , jackSupport ? false, libjack2, soxr
, pcapSupport ? false, libpcap
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -16,14 +17,16 @@ stdenv.mkDerivation rec {
}; };
buildInputs = lib.optional pulseSupport libpulseaudio buildInputs = lib.optional pulseSupport libpulseaudio
++ lib.optional jackSupport libjack2 ++ 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";