Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, larynx 4 5# build 6, cython 7, python 8 9# propagates 10, espeak-phonemizer 11, librosa 12, numpy 13, onnxruntime 14, pytorch-lightning 15, torch 16}: 17 18buildPythonPackage rec { 19 inherit (larynx) version src meta; 20 21 pname = "larynx-train"; 22 format = "setuptools"; 23 24 sourceRoot = "source/src/python"; 25 26 nativeBuildInputs = [ 27 cython 28 ]; 29 30 postPatch = '' 31 substituteInPlace requirements.txt \ 32 --replace "onnxruntime~=1.11.0" "onnxruntime" \ 33 --replace "pytorch-lightning~=1.7.0" "pytorch-lightning" \ 34 --replace "torch~=1.11.0" "torch" 35 ''; 36 37 postBuild = '' 38 make -C larynx_train/vits/monotonic_align 39 ''; 40 41 postInstall = '' 42 export MONOTONIC_ALIGN=$out/${python.sitePackages}/larynx_train/vits/monotonic_align/monotonic_align 43 mkdir -p $MONOTONIC_ALIGN 44 cp -v ./larynx_train/vits/monotonic_align/larynx_train/vits/monotonic_align/core.*.so $MONOTONIC_ALIGN/ 45 ''; 46 47 propagatedBuildInputs = [ 48 espeak-phonemizer 49 librosa 50 numpy 51 onnxruntime 52 pytorch-lightning 53 torch 54 ]; 55 56 pythonImportsCheck = [ 57 "larynx_train" 58 ]; 59 60 doCheck = false; # no tests 61}