diff --git a/pkgs/development/python-modules/openai-whisper/default.nix b/pkgs/development/python-modules/openai-whisper/default.nix index 634f8677be2c..958c9250f9f8 100644 --- a/pkgs/development/python-modules/openai-whisper/default.nix +++ b/pkgs/development/python-modules/openai-whisper/default.nix @@ -11,7 +11,7 @@ # runtime ffmpeg-headless, - # propagates + # dependencies more-itertools, numba, numpy, @@ -23,6 +23,7 @@ # tests pytestCheckHook, scipy, + writableTmpDirAsHomeHook, }: buildPythonPackage rec { @@ -54,30 +55,33 @@ buildPythonPackage rec { tqdm ] ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform triton) [ triton ]; - preCheck = '' - export HOME=$TMPDIR - ''; - nativeCheckInputs = [ pytestCheckHook scipy + writableTmpDirAsHomeHook ]; - disabledTests = [ - # requires network access to download models - "test_transcribe" - # requires NVIDIA drivers - "test_dtw_cuda_equivalence" - "test_median_filter_equivalence" - ]; + disabledTests = + [ + # requires network access to download models + "test_transcribe" - meta = with lib; { + # requires NVIDIA drivers + "test_dtw_cuda_equivalence" + "test_median_filter_equivalence" + ] + ++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [ + # Fatal Python error: Segmentation fault + "test_dtw" + ]; + + meta = { changelog = "https://github.com/openai/whisper/blob/v${version}/CHANGELOG.md"; description = "General-purpose speech recognition model"; mainProgram = "whisper"; homepage = "https://github.com/openai/whisper"; - license = licenses.mit; - maintainers = with maintainers; [ + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ hexa MayNiklas ];