diff options
-rw-r--r-- | pkgs/tools/audio/piper/train.nix (renamed from pkgs/development/python-modules/piper-train/default.nix) | 44 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 | ||||
-rw-r--r-- | pkgs/top-level/python-aliases.nix | 1 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 2 |
4 files changed, 19 insertions, 30 deletions
diff --git a/pkgs/development/python-modules/piper-train/default.nix b/pkgs/tools/audio/piper/train.nix index 3adb94c8f2291..a385ebb85ad66 100644 --- a/pkgs/development/python-modules/piper-train/default.nix +++ b/pkgs/tools/audio/piper/train.nix @@ -1,39 +1,26 @@ -{ buildPythonPackage -, piper-tts - -# build -, cython -, python - -# propagates -, espeak-phonemizer -, librosa -, numpy -, onnxruntime -, piper-phonemize -, pytorch-lightning -, torch +{ piper-tts +, python3 }: -buildPythonPackage { - inherit (piper-tts) version src meta; +let + python = python3.override { + packageOverrides = self: super: { + }; + }; +in + +python.pkgs.buildPythonPackage { + inherit (piper-tts) version src; pname = "piper-train"; format = "setuptools"; sourceRoot = "source/src/python"; - nativeBuildInputs = [ + nativeBuildInputs = with python.pkgs; [ cython ]; - postPatch = '' - substituteInPlace requirements.txt \ - --replace "onnxruntime~=1.11.0" "onnxruntime" \ - --replace "pytorch-lightning~=1.7.0" "pytorch-lightning" \ - --replace "torch~=1.11.0" "torch" - ''; - postBuild = '' make -C piper_train/vits/monotonic_align ''; @@ -44,7 +31,7 @@ buildPythonPackage { cp -v ./piper_train/vits/monotonic_align/piper_train/vits/monotonic_align/core.*.so $MONOTONIC_ALIGN/ ''; - propagatedBuildInputs = [ + propagatedBuildInputs = with python.pkgs; [ espeak-phonemizer librosa numpy @@ -59,4 +46,9 @@ buildPythonPackage { ]; doCheck = false; # no tests + + meta = piper-tts.meta // { + # requires torch<2, pytorch-lightning~=1.7 + broken = true; + }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c7201ca7d59a9..09407ff1ca059 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11709,7 +11709,7 @@ with pkgs; pim6sd = callPackage ../servers/pim6sd { }; piper-phonemize = callPackage ../development/libraries/piper-phonemize { }; - piper-train = with python3Packages; toPythonApplication piper-train; + piper-train = callPackage ../tools/audio/piper/train.nix { }; piper-tts = callPackage ../tools/audio/piper { }; phosh = callPackage ../applications/window-managers/phosh { }; diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index a6ef2838bcb68..63addfa58a038 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -184,7 +184,6 @@ mapAliases ({ jupyter_server = jupyter-server; # added 2023-01-05 Kajiki = kajiki; # added 2023-02-19 Keras = keras; # added 2021-11-25 - larynx-train = piper-train; # added 2023-06-09 ldap = python-ldap; # added 2022-09-16 lammps-cython = throw "lammps-cython no longer builds and is unmaintained"; # added 2021-07-04 logilab_astng = throw "logilab-astng has not been released since 2013 and is unmaintained"; # added 2022-11-29 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e3e9a7ce7a607..bf738d556a9fd 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7970,8 +7970,6 @@ self: super: with self; { piper-phonemize-native = pkgs.piper-phonemize; }; - piper-train = callPackage ../development/python-modules/piper-train { }; - pip-api = callPackage ../development/python-modules/pip-api { }; pip-tools = callPackage ../development/python-modules/pip-tools { }; |