summary refs log tree commit diff
path: root/pkgs/tools/audio/whisper-ctranslate2/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-11-21 16:12:21 +0100
committerAlyssa Ross <hi@alyssa.is>2023-11-21 16:12:48 +0100
commit048a4cd441a59cbf89defb18bb45c9f0b4429b35 (patch)
treef8f5850ff05521ab82d65745894714a8796cbfb6 /pkgs/tools/audio/whisper-ctranslate2/default.nix
parent030c5028b07afcedce7c5956015c629486cc79d9 (diff)
parent4c2d05dd6435d449a3651a6dd314d9411b5f8146 (diff)
downloadnixpkgs-048a4cd441a59cbf89defb18bb45c9f0b4429b35.tar
nixpkgs-048a4cd441a59cbf89defb18bb45c9f0b4429b35.tar.gz
nixpkgs-048a4cd441a59cbf89defb18bb45c9f0b4429b35.tar.bz2
nixpkgs-048a4cd441a59cbf89defb18bb45c9f0b4429b35.tar.lz
nixpkgs-048a4cd441a59cbf89defb18bb45c9f0b4429b35.tar.xz
nixpkgs-048a4cd441a59cbf89defb18bb45c9f0b4429b35.tar.zst
nixpkgs-048a4cd441a59cbf89defb18bb45c9f0b4429b35.zip
Rebase onto e4ad989506ec7d71f7302cc3067abd82730a4beb HEAD rootfs
Signed-off-by: Alyssa Ross <hi@alyssa.is>
Diffstat (limited to 'pkgs/tools/audio/whisper-ctranslate2/default.nix')
-rw-r--r--pkgs/tools/audio/whisper-ctranslate2/default.nix17
1 files changed, 13 insertions, 4 deletions
diff --git a/pkgs/tools/audio/whisper-ctranslate2/default.nix b/pkgs/tools/audio/whisper-ctranslate2/default.nix
index 6ca3226bf67..dd928ab3e41 100644
--- a/pkgs/tools/audio/whisper-ctranslate2/default.nix
+++ b/pkgs/tools/audio/whisper-ctranslate2/default.nix
@@ -1,11 +1,11 @@
 { lib
+, python3
 , fetchFromGitHub
 , nix-update-script
-, python3
 }:
 let
   pname = "whisper-ctranslate2";
-  version = "0.2.7";
+  version = "0.3.2";
 in
 python3.pkgs.buildPythonApplication {
   inherit pname version;
@@ -15,9 +15,9 @@ python3.pkgs.buildPythonApplication {
 
   src = fetchFromGitHub {
     owner = "Softcatala";
-    repo = pname;
+    repo = "whisper-ctranslate2";
     rev = version;
-    hash = "sha256-dUmQNKgH+SIlLhUEiaEGXUHZQDr3fidsAU2vATJiXBU=";
+    hash = "sha256-9Y9y7DihDnbREaeARCGC7ctwwBAoZPpIWDAOdeDnB6E=";
   };
 
   propagatedBuildInputs = with python3.pkgs; [
@@ -30,6 +30,15 @@ python3.pkgs.buildPythonApplication {
 
   passthru.updateScript = nix-update-script { };
 
+  nativeCheckInputs = with python3.pkgs; [
+    nose2
+  ];
+
+  checkPhase = ''
+    # Note: we are not running the `e2e-tests` because they require downloading models from the internet.
+    ${python3.interpreter} -m nose2 -s tests
+  '';
+
   meta = with lib; {
     description = "Whisper command line client compatible with original OpenAI client based on CTranslate2";
     homepage = "https://github.com/Softcatala/whisper-ctranslate2";