Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv, lib, fetchurl, autoPatchelfHook, bzip2, xz }: 2 3stdenv.mkDerivation rec { 4 pname = "stt"; 5 version = "1.4.0"; 6 7 src = fetchurl { 8 url = "https://github.com/coqui-ai/STT/releases/download/v${version}/native_client.tflite.Linux.tar.xz"; 9 hash = "sha256-RVYc64pLYumQoVUEFZdxfUUaBMozaqgD0h/yiMaWN90="; 10 }; 11 setSourceRoot = "sourceRoot=`pwd`"; 12 13 nativeBuildInputs = [ 14 autoPatchelfHook 15 ]; 16 17 buildInputs = [ 18 bzip2 19 xz 20 stdenv.cc.cc.lib 21 ]; 22 23 installPhase = '' 24 install -D stt $out/bin/stt 25 install -D coqui-stt.h $out/include/coqui-stt.h 26 install -D libkenlm.so $out/lib/libkenlm.so 27 install -D libsox.so.3 $out/lib/libsox.so.3 28 install -D libstt.so $out/lib/libstt.so 29 ''; 30 31 meta = with lib; { 32 homepage = "https://github.com/coqui-ai/STT"; 33 description = "Deep learning toolkit for Speech-to-Text, battle-tested in research and production"; 34 sourceProvenance = with sourceTypes; [ binaryNativeCode ]; 35 license = licenses.mpl20; 36 platforms = [ "x86_64-linux" ]; 37 maintainers = with maintainers; [ rvolosatovs ]; 38 }; 39}