[Backport release-24.05] python3Packages.trainer: fix build

[Backport release-24.05] python3Packages.trainer: fix build
This commit is contained in:
Aleksana 2024-05-26 18:56:49 +08:00 committed by GitHub
commit 4c827f2767
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,6 +2,7 @@
lib, lib,
buildPythonPackage, buildPythonPackage,
fetchFromGitHub, fetchFromGitHub,
fetchpatch,
coqpit, coqpit,
fsspec, fsspec,
@ -30,6 +31,14 @@ buildPythonPackage {
hash = "sha256-z6TOzWqE3NytkdG3nUzh9GpFVGQEXFyzSQ8gvdB4wiw="; hash = "sha256-z6TOzWqE3NytkdG3nUzh9GpFVGQEXFyzSQ8gvdB4wiw=";
}; };
patches = [
(fetchpatch {
name = "add-support-for-python312.patch";
hash = "sha256-V5RPn/2pGKzQrf/SIRU3imo6nBhpBEJpI7HsFYbVZj4=";
url = "https://github.com/coqui-ai/Trainer/commit/0278012c7e6f5972b656d11757add4ab89f6d272.patch";
})
];
postPatch = '' postPatch = ''
sed -i 's/^protobuf.*/protobuf/' requirements.txt sed -i 's/^protobuf.*/protobuf/' requirements.txt
''; '';