diff --git a/pkgs/by-name/tt/tts/package.nix b/pkgs/by-name/tt/tts/package.nix index 26ad68675736..f4ce01fe7cdc 100644 --- a/pkgs/by-name/tt/tts/package.nix +++ b/pkgs/by-name/tt/tts/package.nix @@ -4,6 +4,8 @@ fetchFromGitHub, espeak-ng, tts, + addBinToPathHook, + writableTmpDirAsHomeHook, }: let @@ -111,18 +113,20 @@ python.pkgs.buildPythonApplication rec { doCheck = true; }); - nativeCheckInputs = with python.pkgs; [ - espeak-ng - pytestCheckHook - ]; + nativeCheckInputs = + with python.pkgs; + [ + espeak-ng + pytestCheckHook + ] + ++ [ + addBinToPathHook + writableTmpDirAsHomeHook + ]; preCheck = '' # use the installed TTS in $PYTHONPATH instead of the one from source to also have cython modules. mv TTS{,.old} - export PATH=$out/bin:$PATH - - # numba tries to write to HOME directory - export HOME=$TMPDIR for file in $(grep -rl 'python TTS/bin' tests); do substituteInPlace "$file" \