From b5279fcbed3f27ef0961792f5ac804a93051476b Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Mon, 3 Feb 2025 22:19:57 +0100 Subject: [PATCH] tts: use `addBinToPathHook`, use `writableTmpDirAsHomeHook` --- pkgs/by-name/tt/tts/package.nix | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) 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" \