mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-25 17:55:21 +00:00
whisper-cpp: 1.8.7 -> 1.9.2 (#549296)
This commit is contained in:
@@ -81,13 +81,13 @@ let
|
||||
in
|
||||
effectiveStdenv.mkDerivation (finalAttrs: {
|
||||
pname = "whisper-cpp";
|
||||
version = "1.8.7";
|
||||
version = "1.9.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ggml-org";
|
||||
repo = "whisper.cpp";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-hzgO2IqV1+JQjiYBBmFSOLfp1BgH0DgU0TZyO7OzFHE=";
|
||||
hash = "sha256-tW3UkERd/4PLpjSObBkZVqJPzue70oGeLDNiQDTDwSU=";
|
||||
};
|
||||
|
||||
# The upstream download script tries to download the models to the
|
||||
@@ -96,15 +96,6 @@ effectiveStdenv.mkDerivation (finalAttrs: {
|
||||
# the models to the current directory of where it is being run from.
|
||||
patches = [ ./download-models.patch ];
|
||||
|
||||
postPatch = ''
|
||||
for target in examples/{bench,command,cli,quantize,server,stream,talk-llama}/CMakeLists.txt; do
|
||||
if ! grep -q -F 'install('; then
|
||||
echo 'install(TARGETS ''${TARGET} RUNTIME)' >> $target
|
||||
${lib.optionalString stdenv.hostPlatform.isDarwin "echo 'install(TARGETS whisper.coreml LIBRARY)' >> src/CMakeLists.txt"}
|
||||
fi
|
||||
done
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
git
|
||||
@@ -185,14 +176,10 @@ effectiveStdenv.mkDerivation (finalAttrs: {
|
||||
installCheckPhase = ''
|
||||
runHook preInstallCheck
|
||||
"$out/bin/whisper-cli" --help >/dev/null
|
||||
"$out/bin/parakeet-cli" --help >/dev/null
|
||||
runHook postInstallCheck
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
substituteInPlace $out/lib/pkgconfig/whisper.pc \
|
||||
--replace-fail '//' '/'
|
||||
'';
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
|
||||
Reference in New Issue
Block a user