nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 65 lines 1.3 kB view raw
1{ lib 2, buildPythonPackage 3, fetchpatch 4, fetchFromGitHub 5, pythonAtLeast 6 7, coqpit 8, fsspec 9, pytorch-bin 10 11, pytestCheckHook 12, soundfile 13, torchvision-bin 14}: 15 16let 17 pname = "coqui-trainer"; 18 version = "0.0.5"; 19in 20buildPythonPackage { 21 inherit pname version; 22 format = "pyproject"; 23 24 disabled = pythonAtLeast "3.10"; # https://github.com/coqui-ai/Trainer/issues/22 25 26 src = fetchFromGitHub { 27 owner = "coqui-ai"; 28 repo = "Trainer"; 29 rev = "v${version}"; 30 hash = "sha256-NsgCh+N2qWmRkTOjXqisVCP5aInH2zcNz6lsnIfVLiY="; 31 }; 32 33 patches = [ 34 (fetchpatch { 35 url = "https://github.com/coqui-ai/Trainer/commit/07b447abf3290c8f2e5e723687b8a480b7382265.patch"; 36 sha256 = "0v1hl784d9rghkblcfwgzp0gg9d6r5r0yv2kapzdz2qymiajy7y2"; 37 }) 38 ]; 39 40 propagatedBuildInputs = [ 41 coqpit 42 fsspec 43 pytorch-bin 44 soundfile 45 ]; 46 47 # only one test and that requires training data from the internet 48 doCheck = false; 49 50 checkInputs = [ 51 pytestCheckHook 52 torchvision-bin 53 ]; 54 55 pythonImportsCheck = [ 56 "trainer" 57 ]; 58 59 meta = with lib; { 60 description = "A general purpose model trainer, as flexible as it gets"; 61 homepage = "https://github.com/coqui-ai/Trainer"; 62 license = licenses.asl20; 63 maintainers = teams.tts.members; 64 }; 65}