diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2022-11-01 01:53:25 +0100 |
---|---|---|
committer | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2022-11-01 01:53:25 +0100 |
commit | 3f25fcd6602920c290aff915c78538bc32e3caa5 (patch) | |
tree | 691777a09073c4c8e88e092c8f6987c072597ab8 /pkgs/development/libraries | |
parent | 4fe2fe1a51238c8c1d6721f7ce49ba44b770d92d (diff) |
codec2: add freedv support
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r-- | pkgs/development/libraries/codec2/default.nix | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/pkgs/development/libraries/codec2/default.nix b/pkgs/development/libraries/codec2/default.nix index 303965b34b637..018ef10aebd53 100644 --- a/pkgs/development/libraries/codec2/default.nix +++ b/pkgs/development/libraries/codec2/default.nix @@ -1,4 +1,11 @@ -{ 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; { |