summary refs log tree commit diff
path: root/pkgs/applications/radio/freedv/default.nix
blob: 43cf58db2581c26371097302f3be269fbe46c5f0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{ lib
, stdenv
, fetchFromGitHub
, cmake
, codec2
, libsamplerate
, libsndfile
, lpcnetfreedv
, portaudio
, pulseaudio
, speexdsp
, hamlib
, wxGTK31-gtk3
}:

stdenv.mkDerivation rec {
  pname = "freedv";
  version = "1.7.0";

  src = fetchFromGitHub {
    owner = "drowe67";
    repo = "freedv-gui";
    rev = "v${version}";
    hash = "sha256-0E7r/7+AQRPIFAcE6O1WE0NYiKzAlBR0jKbssqWvRMU=";
  };

  nativeBuildInputs = [ cmake ];
  buildInputs = [
    codec2
    libsamplerate
    libsndfile
    lpcnetfreedv
    speexdsp
    hamlib
    wxGTK31-gtk3
  ] ++ (if stdenv.isLinux then [ pulseaudio ] else [ portaudio ]);

  cmakeFlags = [
    "-DUSE_INTERNAL_CODEC2:BOOL=FALSE"
    "-DUSE_STATIC_DEPS:BOOL=FALSE"
  ] ++ lib.optionals stdenv.isLinux [ "-DUSE_PULSEAUDIO:BOOL=TRUE" ];

  meta = with lib; {
    homepage = "https://freedv.org/";
    description = "Digital voice for HF radio";
    license = licenses.lgpl21;
    maintainers = with maintainers; [ mvs ];
  };
}