freedv: permit selection of audio backend

This commit is contained in:
Mikael Voss 2022-02-15 13:54:08 +01:00
parent e7e86ceb19
commit 7ed0799682
No known key found for this signature in database
GPG key ID: D991B1833C467B03

View file

@ -1,16 +1,18 @@
{ lib
{ config
, lib
, stdenv
, fetchFromGitHub
, cmake
, codec2
, libpulseaudio
, libsamplerate
, libsndfile
, lpcnetfreedv
, portaudio
, pulseaudio
, speexdsp
, hamlib
, wxGTK31-gtk3
, pulseSupport ? config.pulseaudio or stdenv.isLinux
}:
stdenv.mkDerivation rec {
@ -33,12 +35,12 @@ stdenv.mkDerivation rec {
speexdsp
hamlib
wxGTK31-gtk3
] ++ (if stdenv.isLinux then [ pulseaudio ] else [ portaudio ]);
] ++ (if pulseSupport then [ libpulseaudio ] else [ portaudio ]);
cmakeFlags = [
"-DUSE_INTERNAL_CODEC2:BOOL=FALSE"
"-DUSE_STATIC_DEPS:BOOL=FALSE"
] ++ lib.optionals stdenv.isLinux [ "-DUSE_PULSEAUDIO:BOOL=TRUE" ];
] ++ lib.optionals pulseSupport [ "-DUSE_PULSEAUDIO:BOOL=TRUE" ];
meta = with lib; {
homepage = "https://freedv.org/";