Unverified Commit aaa354ec authored by Artturin's avatar Artturin Committed by GitHub
Browse files

openai-whisper-cpp: 1.7.0 -> 1.7.1 (#349647)

parents 46c6b8c0 b88b179d
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -25,13 +25,13 @@ let
in
effectiveStdenv.mkDerivation (finalAttrs: {
  pname = "whisper-cpp";
  version = "1.7.0";
  version = "1.7.1";

  src = fetchFromGitHub {
    owner = "ggerganov";
    repo = "whisper.cpp";
    rev = "refs/tags/v${finalAttrs.version}" ;
    hash = "sha256-obAXqqQEs7lkv6v1vl3aN+Vh6wPSYSXXbI6mlee6/QM=";
    hash = "sha256-EDFUVjud79ZRCzGbOh9L9NcXfN3ikvsqkVSOME9F9oo=";
  };

  # The upstream download script tries to download the models to the
@@ -78,15 +78,18 @@ effectiveStdenv.mkDerivation (finalAttrs: {
    GGML_CUDA = "1";
  };

  makeFlags = [ "main" "stream" "command" ];

  installPhase = ''
    runHook preInstall

    mkdir -p $out/bin

    cp ./main $out/bin/whisper-cpp
    cp ./stream $out/bin/whisper-cpp-stream
    cp ./command $out/bin/whisper-cpp-command

    for file in *; do
      if [[ -x "$file" && -f "$file" && "$file" != "main" ]]; then
        cp "$file" "$out/bin/whisper-cpp-$file"
      fi
    done

    cp models/download-ggml-model.sh $out/bin/whisper-cpp-download-ggml-model