mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-08 14:03:29 +00:00
e0816431a2
Otherwise references to the Python interpreter inside the set are wrong, as demonstrated by: ``` nix with import <nixpkgs> { }; let python' = python3.override { packageOverrides = final: prev: { requests = prev.requests.overridePythonAttrs(old: { version = "1337"; }); }; }; in python'.pkgs.python.pkgs.requests ``` which returns the _non_ overriden requests. And the same with `self`: ``` with import <nixpkgs> { }; let python' = python3.override { self = python'; packageOverrides = final: prev: { requests = prev.requests.overridePythonAttrs(old: { version = "1337"; }); }; }; in python'.pkgs.python.pkgs.requests ``` which returns the overriden requests. This can manifest itself as file collisions when constructing environments or as subtly incorrect dependency graphs.
52 lines
966 B
Nix
52 lines
966 B
Nix
{ piper-tts
|
|
, python3
|
|
}:
|
|
|
|
let
|
|
python = python3;
|
|
in
|
|
|
|
python.pkgs.buildPythonPackage {
|
|
inherit (piper-tts) version src;
|
|
|
|
pname = "piper-train";
|
|
format = "setuptools";
|
|
|
|
sourceRoot = "${piper-tts.src.name}/src/python";
|
|
|
|
nativeBuildInputs = with python.pkgs; [
|
|
cython
|
|
];
|
|
|
|
postBuild = ''
|
|
make -C piper_train/vits/monotonic_align
|
|
'';
|
|
|
|
postInstall = ''
|
|
export MONOTONIC_ALIGN=$out/${python.sitePackages}/piper_train/vits/monotonic_align/monotonic_align
|
|
mkdir -p $MONOTONIC_ALIGN
|
|
cp -v ./piper_train/vits/monotonic_align/piper_train/vits/monotonic_align/core.*.so $MONOTONIC_ALIGN/
|
|
'';
|
|
|
|
propagatedBuildInputs = with python.pkgs; [
|
|
espeak-phonemizer
|
|
librosa
|
|
numpy
|
|
onnxruntime
|
|
piper-phonemize
|
|
pytorch-lightning
|
|
torch
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"piper_train"
|
|
];
|
|
|
|
doCheck = false; # no tests
|
|
|
|
meta = piper-tts.meta // {
|
|
# requires torch<2, pytorch-lightning~=1.7
|
|
broken = true;
|
|
};
|
|
}
|