From 4fe2fe1a51238c8c1d6721f7ce49ba44b770d92d Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Tue, 1 Nov 2022 01:53:12 +0100 Subject: [PATCH 1/3] lpcnetfreedv: unstable-2021-06-29 -> unstable-2022-08-22 --- pkgs/development/libraries/lpcnetfreedv/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/lpcnetfreedv/default.nix b/pkgs/development/libraries/lpcnetfreedv/default.nix index 33b295b9a1ec..b3b1d7059d81 100644 --- a/pkgs/development/libraries/lpcnetfreedv/default.nix +++ b/pkgs/development/libraries/lpcnetfreedv/default.nix @@ -4,21 +4,21 @@ let dataVersion = "191005_v1.0"; data = fetchurl { url = "http://rowetel.com/downloads/deep/lpcnet_${dataVersion}.tgz"; - sha256 = "1j1695hm2pg6ri611f9kr3spm4yxvpikws55z9zxizai8y94152h"; + sha256 = "sha256-UJRAkkdR/dh/+qVoPuPd3ZN69cgzuRBMzOZdUWFJJsg="; }; -in stdenv.mkDerivation rec { +in +stdenv.mkDerivation rec { pname = "lpcnetfreedv"; - version = "unstable-2021-06-29"; + version = "unstable-2022-08-22"; src = fetchFromGitHub { owner = "drowe67"; repo = "LPCNet"; - rev = "0dc5935bbf49ff3ba3c9654cc2f802838ebbaead"; - sha256 = "0r6488z40fkar11ync8achpg5l6qz7y7cbh7cs3b3w4fsxn58q9i"; + rev = "67a6eb74d0c07faddcdce199856862cc45779d25"; + sha256 = "sha256-eHYZoDgoZBuuLvQn9X7H/zmK5onOAniOgY1/8RVn8gk="; }; nativeBuildInputs = [ cmake ]; - buildInputs = [ codec2 ]; postPatch = '' mkdir build From 3f25fcd6602920c290aff915c78538bc32e3caa5 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Tue, 1 Nov 2022 01:53:25 +0100 Subject: [PATCH 2/3] codec2: add freedv support --- pkgs/development/libraries/codec2/default.nix | 15 ++++++++++++++- pkgs/top-level/all-packages.nix | 3 +++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/codec2/default.nix b/pkgs/development/libraries/codec2/default.nix index 303965b34b63..018ef10aebd5 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; { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f923ae0d2456..cd2eaffd33a4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { From 30507f88ad9c7ee5d91c53b954226eb0b11cc6cd Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Tue, 1 Nov 2022 01:53:31 +0100 Subject: [PATCH 3/3] freedv: 1.8.3.1 -> 1.8.4 --- pkgs/applications/radio/freedv/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/radio/freedv/default.nix b/pkgs/applications/radio/freedv/default.nix index ba8646885482..b648c04577e0 100644 --- a/pkgs/applications/radio/freedv/default.nix +++ b/pkgs/applications/radio/freedv/default.nix @@ -21,13 +21,13 @@ stdenv.mkDerivation rec { pname = "freedv"; - version = "1.8.3.1"; + version = "1.8.4"; src = fetchFromGitHub { owner = "drowe67"; repo = "freedv-gui"; rev = "v${version}"; - hash = "sha256-LPCY5gPinxJkfPfumKggI/JQorcW+Qw/ZAP6XQmPkeA="; + hash = "sha256-X/jL6q2yLNtRq7Xg9JeXu1zXD0KCs59D1poA9hM3Ndo="; }; postPatch = lib.optionalString stdenv.isDarwin '' @@ -58,12 +58,15 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DUSE_INTERNAL_CODEC2:BOOL=FALSE" "-DUSE_STATIC_DEPS:BOOL=FALSE" + "-DUNITTEST=ON" ] ++ lib.optionals pulseSupport [ "-DUSE_PULSEAUDIO:BOOL=TRUE" ]; NIX_CFLAGS_COMPILE = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ "-DAPPLE_OLD_XCODE" ]; + doCheck = true; + meta = with lib; { homepage = "https://freedv.org/"; description = "Digital voice for HF radio";