From 7ed0799682736cd4631195937dcce2bd52ce3c23 Mon Sep 17 00:00:00 2001 From: Mikael Voss Date: Tue, 15 Feb 2022 13:54:08 +0100 Subject: freedv: permit selection of audio backend --- pkgs/applications/radio/freedv/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'pkgs/applications/radio/freedv') diff --git a/pkgs/applications/radio/freedv/default.nix b/pkgs/applications/radio/freedv/default.nix index 33bb9236bd939..8d97c8bbedbc9 100644 --- a/pkgs/applications/radio/freedv/default.nix +++ b/pkgs/applications/radio/freedv/default.nix @@ -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/"; -- cgit 1.4.1