tts: use addBinToPathHook, use writableTmpDirAsHomeHook

This commit is contained in:
Pol Dellaiera
2025-02-04 09:01:38 +01:00
parent a8ad6d2988
commit b5279fcbed
+12 -8
View File
@@ -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" \