Commit 3f25fcd6 authored by Weijia Wang's avatar Weijia Wang
Browse files

codec2: add freedv support

parent 4fe2fe1a
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
{ lib, stdenv, fetchFromGitHub, cmake }:
{ lib
, stdenv
, fetchFromGitHub
, cmake
, freedvSupport ? false
, lpcnetfreedv
, codec2
}:

stdenv.mkDerivation rec {
  pname = "codec2";
@@ -13,6 +20,10 @@ stdenv.mkDerivation rec {

  nativeBuildInputs = [ cmake ];

  buildInputs = lib.optionals freedvSupport [
    lpcnetfreedv
  ];

  # Install a binary that is used by openwebrx
  postInstall = ''
    install -Dm0755 src/freedv_rx -t $out/bin/
@@ -26,6 +37,8 @@ stdenv.mkDerivation rec {
  cmakeFlags = [
    # RPATH of binary /nix/store/.../bin/freedv_rx contains a forbidden reference to /build/
    "-DCMAKE_SKIP_BUILD_RPATH=ON"
  ] ++ lib.optionals freedvSupport [
    "-DLPCNET=ON"
  ];

  meta = with lib; {
+3 −0
Original line number Diff line number Diff line
@@ -28614,6 +28614,9 @@ with pkgs;
  freedv = callPackage ../applications/radio/freedv {
    inherit (darwin.apple_sdk.frameworks) AppKit AVFoundation Cocoa CoreMedia;
    codec2 = codec2.override {
      freedvSupport = true;
    };
  };
  freemind = callPackage ../applications/misc/freemind {