Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

60 lines
1.5 KiB
Nix

{
lib,
stdenv,
python3,
python3Packages,
fetchFromGitHub,
nix-update-script,
}:
let
pname = "whisper-ctranslate2";
version = "0.5.4";
in
python3Packages.buildPythonApplication {
inherit pname version;
pyproject = true;
src = fetchFromGitHub {
owner = "Softcatala";
repo = "whisper-ctranslate2";
tag = version;
hash = "sha256-FunrxIZaKecn2g2ZZ9aBN8IMqwfJG2oEQyH8lv7Tjzo=";
};
build-system = [ python3Packages.setuptools ];
dependencies = with python3Packages; [
ctranslate2
faster-whisper
numpy
pyannote-audio
sounddevice
tqdm
];
nativeCheckInputs = with python3Packages; [
nose2
];
checkPhase = ''
runHook preCheck
# Note: we are not running the `e2e-tests` because they require downloading models from the internet.
${python3.interpreter} -m nose2 -s tests
runHook postCheck
'';
# Tests fail in build sandbox on aarch64-linux, but the program still works at
# runtime. See https://github.com/microsoft/onnxruntime/issues/10038.
doCheck = with stdenv.buildPlatform; !(isAarch && isLinux);
passthru.updateScript = nix-update-script { };
meta = {
description = "Whisper command line client compatible with original OpenAI client based on CTranslate2";
homepage = "https://github.com/Softcatala/whisper-ctranslate2";
changelog = "https://github.com/Softcatala/whisper-ctranslate2/releases/tag/${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ happysalada ];
mainProgram = "whisper-ctranslate2";
};
}