LPCNet: 0.5 -> 0.5-unstable-2025-01-19 (#404338)

authored by Doron Behar and committed by GitHub 694814ad d91608b0

+75 -139
+2 -2
pkgs/by-name/co/codec2/package.nix
··· 6 6 fetchFromGitHub, 7 7 cmake, 8 8 freedvSupport ? false, 9 - lpcnetfreedv, 9 + lpcnet, 10 10 }: 11 11 12 12 stdenv.mkDerivation (finalAttrs: { ··· 37 37 ]; 38 38 39 39 buildInputs = lib.optionals freedvSupport [ 40 - lpcnetfreedv 40 + lpcnet 41 41 ]; 42 42 43 43 # we need to unset these variables from stdenv here and then set their equivalents in the cmake flags
+2 -2
pkgs/by-name/fr/freedv/package.nix
··· 11 11 libpulseaudio, 12 12 libsamplerate, 13 13 libsndfile, 14 - lpcnetfreedv, 14 + lpcnet, 15 15 portaudio, 16 16 speexdsp, 17 17 hamlib_4, ··· 54 54 codec2 55 55 libsamplerate 56 56 libsndfile 57 - lpcnetfreedv 57 + lpcnet 58 58 speexdsp 59 59 hamlib_4 60 60 wxGTK32
-84
pkgs/by-name/lp/LPCNet/package.nix
··· 1 - { 2 - lib, 3 - stdenv, 4 - fetchFromGitHub, 5 - fetchurl, 6 - cmake, 7 - codec2, 8 - # for tests 9 - octave, 10 - sox, 11 - }: 12 - 13 - stdenv.mkDerivation (finalAttrs: { 14 - pname = "LPCNet"; 15 - version = "0.5"; 16 - 17 - src = fetchFromGitHub { 18 - owner = "drowe67"; 19 - repo = "LPCNet"; 20 - tag = "v${finalAttrs.version}"; 21 - hash = "sha256-tHZLKXmuM86A6OpfS3CRRjhFbqj1Q/w1w56msdgLHb0="; 22 - }; 23 - 24 - passthru = { 25 - # Prebuilt neural network model that is needed during the build - can be overwritten 26 - nnmodel = fetchurl { 27 - url = "http://rowetel.com/downloads/deep/lpcnet_191005_v1.0.tgz"; 28 - hash = "sha256-UJRAkkdR/dh/+qVoPuPd3ZN69cgzuRBMzOZdUWFJJsg="; 29 - }; 30 - }; 31 - 32 - preConfigure = '' 33 - mkdir build 34 - cp \ 35 - ${finalAttrs.finalPackage.passthru.nnmodel} \ 36 - build/${finalAttrs.finalPackage.passthru.nnmodel.name} 37 - ''; 38 - 39 - prePatch = '' 40 - patchShebangs *.sh unittest/*.sh 41 - ''; 42 - 43 - nativeBuildInputs = [ 44 - cmake 45 - ]; 46 - 47 - buildInputs = [ 48 - codec2 49 - ]; 50 - 51 - cmakeFlags = lib.optionals (stdenv.cc.isClang && stdenv.hostPlatform.isAarch64) [ 52 - # unsupported option '-mfpu=' for target 'x86_64-apple-darwin' 53 - "-DNEON=OFF" 54 - ]; 55 - 56 - nativeCheckInputs = [ 57 - octave 58 - sox 59 - ]; 60 - 61 - disabledTests = lib.optionals (stdenv.cc.isClang && stdenv.hostPlatform.isAarch64) [ 62 - # disable tests that require NEON 63 - "SIMD_functions" 64 - ]; 65 - 66 - doCheck = true; 67 - checkPhase = '' 68 - runHook preCheck 69 - 70 - export LD_LIBRARY_PATH="$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}/build/source/build/src" 71 - 72 - ctest -j 1 --output-on-failure -E '^${lib.concatStringsSep "|" finalAttrs.disabledTests}$' 73 - 74 - runHook postCheck 75 - ''; 76 - 77 - meta = { 78 - description = "Experimental Neural Net speech coding for FreeDV"; 79 - homepage = "https://github.com/drowe67/LPCNet"; 80 - license = lib.licenses.bsd3; 81 - maintainers = with lib.maintainers; [ doronbehar ]; 82 - platforms = lib.platforms.all; 83 - }; 84 - })
+69
pkgs/by-name/lp/lpcnet/package.nix
··· 1 + { 2 + lib, 3 + stdenv, 4 + fetchFromGitHub, 5 + fetchurl, 6 + cmake, 7 + codec2, 8 + sox, 9 + }: 10 + 11 + stdenv.mkDerivation (finalAttrs: { 12 + pname = "LPCNet"; 13 + version = "0.5-unstable-2025-01-19"; 14 + 15 + src = fetchFromGitHub { 16 + owner = "drowe67"; 17 + repo = "LPCNet"; 18 + rev = "c8e51ac5e2fe674849cb53e7da44689b572cc246"; 19 + sha256 = "sha256-0Knoym+deTuFAyJrrD55MijVh6DlhJp3lss66BJUHiA="; 20 + }; 21 + 22 + patches = [ 23 + # extracted from https://github.com/drowe67/LPCNet/pull/59 24 + ./darwin.patch 25 + ]; 26 + 27 + passthru = { 28 + # Prebuilt neural network model that is needed during the build - can be overwritten 29 + nnmodel = fetchurl { 30 + url = "http://rowetel.com/downloads/deep/lpcnet_191005_v1.0.tgz"; 31 + hash = "sha256-UJRAkkdR/dh/+qVoPuPd3ZN69cgzuRBMzOZdUWFJJsg="; 32 + }; 33 + }; 34 + 35 + preConfigure = '' 36 + mkdir build 37 + cp \ 38 + ${finalAttrs.finalPackage.passthru.nnmodel} \ 39 + build/${finalAttrs.finalPackage.passthru.nnmodel.name} 40 + ''; 41 + 42 + nativeBuildInputs = [ 43 + cmake 44 + ]; 45 + 46 + buildInputs = [ 47 + codec2 48 + ]; 49 + 50 + doCheck = true; 51 + nativeCheckInputs = [ 52 + # NOTE: From some reason, the tests pass without this on x86_64-linux, but 53 + # not on aarch64-linux, although the relevant test is not enabled 54 + # conditionally, see: 55 + # https://github.com/drowe67/LPCNet/blob/c8e51ac5e2fe674849cb53e7da44689b572cc246/CMakeLists.txt#L220-L225 56 + sox 57 + ]; 58 + 59 + meta = { 60 + description = "Experimental Neural Net speech coding for FreeDV"; 61 + homepage = "https://github.com/drowe67/LPCNet"; 62 + license = lib.licenses.bsd3; 63 + maintainers = with lib.maintainers; [ 64 + doronbehar 65 + mvs 66 + ]; 67 + platforms = lib.platforms.all; 68 + }; 69 + })
pkgs/by-name/lp/lpcnetfreedv/darwin.patch pkgs/by-name/lp/lpcnet/darwin.patch
-51
pkgs/by-name/lp/lpcnetfreedv/package.nix
··· 1 - { 2 - lib, 3 - stdenv, 4 - fetchFromGitHub, 5 - fetchurl, 6 - cmake, 7 - nix-update-script, 8 - }: 9 - 10 - let 11 - dataVersion = "191005_v1.0"; 12 - data = fetchurl { 13 - url = "http://rowetel.com/downloads/deep/lpcnet_${dataVersion}.tgz"; 14 - sha256 = "sha256-UJRAkkdR/dh/+qVoPuPd3ZN69cgzuRBMzOZdUWFJJsg="; 15 - }; 16 - in 17 - stdenv.mkDerivation { 18 - pname = "lpcnetfreedv"; 19 - version = "0.5-unstable-2025-01-19"; 20 - 21 - src = fetchFromGitHub { 22 - owner = "drowe67"; 23 - repo = "LPCNet"; 24 - rev = "c8e51ac5e2fe674849cb53e7da44689b572cc246"; 25 - sha256 = "sha256-0Knoym+deTuFAyJrrD55MijVh6DlhJp3lss66BJUHiA="; 26 - }; 27 - 28 - nativeBuildInputs = [ cmake ]; 29 - 30 - patches = [ 31 - # extracted from https://github.com/drowe67/LPCNet/pull/59 32 - ./darwin.patch 33 - ]; 34 - 35 - postPatch = '' 36 - mkdir build 37 - ln -s ${data} build/lpcnet_${dataVersion}.tgz 38 - ''; 39 - 40 - passthru.updateScript = nix-update-script { 41 - extraArgs = [ "--version=branch" ]; 42 - }; 43 - 44 - meta = { 45 - homepage = "https://freedv.org/"; 46 - description = "Experimental Neural Net speech coding for FreeDV"; 47 - license = lib.licenses.bsd3; 48 - maintainers = with lib.maintainers; [ mvs ]; 49 - platforms = lib.platforms.all; 50 - }; 51 - }
+2
pkgs/top-level/aliases.nix
··· 1817 1817 libtransmission = lib.warnOnInstantiate (transmission3Warning { 1818 1818 prefix = "lib"; 1819 1819 }) libtransmission_3; # Added 2024-06-10 1820 + lpcnetfreedv = throw "lpcnetfreedv was removed in favor of LPCNet"; # Added 2025-05-05 1821 + LPCNet = lpcnet; # Added 2025-05-05 1820 1822 tracker = lib.warnOnInstantiate "tracker has been renamed to tinysparql" tinysparql; # Added 2024-09-30 1821 1823 tracker-miners = lib.warnOnInstantiate "tracker-miners has been renamed to localsearch" localsearch; # Added 2024-09-30 1822 1824 transcode = throw "transcode has been removed as it is unmaintained"; # Added 2024-12-11