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