whisper_cpp: init at 1.2.0
This commit is contained in:
parent
d907a41518
commit
b095898a01
|
@ -45,4 +45,6 @@ in
|
|||
unxwb = callPackage ./unxwb { };
|
||||
|
||||
VisiCut = callPackage ./VisiCut { };
|
||||
|
||||
whisper_cpp = callPackage ./whisper_cpp { };
|
||||
}
|
||||
|
|
|
@ -58,7 +58,8 @@
|
|||
nsz
|
||||
playgsf
|
||||
textidote
|
||||
unxwb;
|
||||
unxwb
|
||||
whisper_cpp;
|
||||
|
||||
mpvScripts = lib.recurseIntoAttrs {
|
||||
inherit (pkgs.mpvScripts)
|
||||
|
|
33
whisper_cpp/default.nix
Normal file
33
whisper_cpp/default.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "whisper.cpp";
|
||||
version = "1.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ggerganov";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-7/10t1yE7Gbs+cyj8I9vJoDeaxEz9Azc2j3f6QCjDGM=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace models/download-ggml-model.sh \
|
||||
--replace 'models_path="$(get_script_path)"' 'models_path="$HOME/.local/share/whisper_cpp"'
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -D main $out/bin/${pname}
|
||||
install -D models/download-ggml-model.sh $out/bin/download-ggml-model
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Port of OpenAI's Whisper model in C/C++";
|
||||
homepage = "https://github.com/ggerganov/whisper.cpp/";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ sbruder ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue