2022-02-15 12:54:08 +00:00
|
|
|
{ config
|
|
|
|
, lib
|
2021-10-20 15:38:32 +00:00
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, codec2
|
2022-02-15 12:54:08 +00:00
|
|
|
, libpulseaudio
|
2021-10-20 15:38:32 +00:00
|
|
|
, libsamplerate
|
|
|
|
, libsndfile
|
|
|
|
, lpcnetfreedv
|
|
|
|
, portaudio
|
|
|
|
, speexdsp
|
|
|
|
, hamlib
|
|
|
|
, wxGTK31-gtk3
|
2022-02-15 12:54:08 +00:00
|
|
|
, pulseSupport ? config.pulseaudio or stdenv.isLinux
|
2021-10-20 15:38:32 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "freedv";
|
2022-08-16 09:15:50 +00:00
|
|
|
version = "1.8.3";
|
2021-10-20 15:38:32 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "drowe67";
|
|
|
|
repo = "freedv-gui";
|
|
|
|
rev = "v${version}";
|
2022-08-16 09:15:50 +00:00
|
|
|
hash = "sha256-hZcaA8ZAkNigWwcaU8K6R6atNi8pqIUUEwkje+3sW8A=";
|
2021-10-20 15:38:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [
|
|
|
|
codec2
|
|
|
|
libsamplerate
|
|
|
|
libsndfile
|
|
|
|
lpcnetfreedv
|
|
|
|
speexdsp
|
|
|
|
hamlib
|
|
|
|
wxGTK31-gtk3
|
2022-02-15 12:54:08 +00:00
|
|
|
] ++ (if pulseSupport then [ libpulseaudio ] else [ portaudio ]);
|
2021-10-20 15:38:32 +00:00
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DUSE_INTERNAL_CODEC2:BOOL=FALSE"
|
|
|
|
"-DUSE_STATIC_DEPS:BOOL=FALSE"
|
2022-02-15 12:54:08 +00:00
|
|
|
] ++ lib.optionals pulseSupport [ "-DUSE_PULSEAUDIO:BOOL=TRUE" ];
|
2021-10-20 15:38:32 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://freedv.org/";
|
|
|
|
description = "Digital voice for HF radio";
|
|
|
|
license = licenses.lgpl21;
|
|
|
|
maintainers = with maintainers; [ mvs ];
|
2022-02-15 12:09:48 +00:00
|
|
|
platforms = platforms.unix;
|
2022-03-23 09:51:39 +00:00
|
|
|
broken = stdenv.isDarwin; # see https://github.com/NixOS/nixpkgs/issues/165422
|
2021-10-20 15:38:32 +00:00
|
|
|
};
|
|
|
|
}
|