mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 17:03:01 +00:00
LPCNet: init at 0.5
This commit is contained in:
parent
340d46ceac
commit
1a00c76659
56
pkgs/by-name/lp/LPCNet/package.nix
Normal file
56
pkgs/by-name/lp/LPCNet/package.nix
Normal file
@ -0,0 +1,56 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
fetchurl,
|
||||
cmake,
|
||||
codec2,
|
||||
# for tests
|
||||
octave,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "LPCNet";
|
||||
version = "0.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "drowe67";
|
||||
repo = "LPCNet";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-tHZLKXmuM86A6OpfS3CRRjhFbqj1Q/w1w56msdgLHb0=";
|
||||
};
|
||||
passthru = {
|
||||
# Prebuilt neural network model that is needed during the build - can be overrwritten
|
||||
nnmodel = fetchurl {
|
||||
url = "http://rowetel.com/downloads/deep/lpcnet_191005_v1.0.tgz";
|
||||
hash = "sha256-UJRAkkdR/dh/+qVoPuPd3ZN69cgzuRBMzOZdUWFJJsg=";
|
||||
};
|
||||
};
|
||||
preConfigure = ''
|
||||
mkdir build
|
||||
cp \
|
||||
${finalAttrs.finalPackage.passthru.nnmodel} \
|
||||
build/${finalAttrs.finalPackage.passthru.nnmodel.name}
|
||||
'';
|
||||
|
||||
prePatch = ''
|
||||
patchShebangs *.sh unittest/*.sh
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ codec2 ];
|
||||
nativeCheckInputs = [ octave ];
|
||||
|
||||
doCheck = true;
|
||||
preCheck = ''
|
||||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}/build/source/build/src"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Experimental Neural Net speech coding for FreeDV";
|
||||
homepage = "https://github.com/drowe67/LPCNet";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ doronbehar ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
})
|
Loading…
Reference in New Issue
Block a user