nixpkgs/pkgs/applications/radio/freedv/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
1.1 KiB
Nix
Raw Normal View History

{ config
, lib
2021-10-20 15:38:32 +00:00
, stdenv
, fetchFromGitHub
, cmake
, codec2
, libpulseaudio
2021-10-20 15:38:32 +00:00
, libsamplerate
, libsndfile
, lpcnetfreedv
, portaudio
, speexdsp
, hamlib
, wxGTK31-gtk3
, pulseSupport ? config.pulseaudio or stdenv.isLinux
2021-10-20 15:38:32 +00:00
}:
stdenv.mkDerivation rec {
pname = "freedv";
version = "1.8.3";
2021-10-20 15:38:32 +00:00
src = fetchFromGitHub {
owner = "drowe67";
repo = "freedv-gui";
rev = "v${version}";
hash = "sha256-hZcaA8ZAkNigWwcaU8K6R6atNi8pqIUUEwkje+3sW8A=";
2021-10-20 15:38:32 +00:00
};
nativeBuildInputs = [ cmake ];
buildInputs = [
codec2
libsamplerate
libsndfile
lpcnetfreedv
speexdsp
hamlib
wxGTK31-gtk3
] ++ (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"
] ++ 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;
broken = stdenv.isDarwin; # see https://github.com/NixOS/nixpkgs/issues/165422
2021-10-20 15:38:32 +00:00
};
}