generated from nix-community/nur-packages-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stt.nix
59 lines (58 loc) · 1.36 KB
/
stt.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{ lib
, buildPythonPackage
, fetchPypi
, pkgs
, python
, coqpit
, attrdict
, tqdm
#, pyogg_0_6_14a1
, pyogg
, numba
, webdataset
, optuna
}:
buildPythonPackage rec {
pname = "stt";
version = "1.4.0";
disabled = python.pythonVersion != "3.10";
format = "wheel";
src = fetchPypi rec {
inherit pname version format;
#sha256 = "k+aKo46UcFDxlJ+Wj+XyzHGci2+grWvRTdCP54TOdmY="; # 1.3.0 cp310
#sha256 = "RNC2sp9rui5TLhV5mX5ZOhkvPPX13wcC7ubO2G5yqgA="; # 1.3.0 cp39
sha256 = "sha256-ufAmSTdDf+AGyO784FE3zbu76XQN3LFJ3LHVgkYopOo=";
dist = python;
python = "cp310";
abi = "cp310";
platform = "manylinux_2_24_x86_64";
};
nativeBuildInputs = [ pkgs.autoPatchelfHook ];
buildInputs = with pkgs; [
# libs for autoPatchelfHook
xz # liblzma.so.5
bzip2 # libbz2.so.1.0
stdenv.cc.cc # libstdc++.so.6
];
# https://github.com/NixOS/nixpkgs/pull/163217
/*
postInstall = ''
patchelf --replace-needed libbz2.so.1.0 libbz2.so.1.0.6 $out/lib/python3.9/site-packages/stt/_impl.cpython-39-x86_64-linux-gnu.so
'';
*/
propagatedBuildInputs = ([
coqpit
#pyogg_0_6_14a1
pyogg
attrdict
tqdm
webdataset
optuna
numba
]);
meta = with lib; {
homepage = "https://github.com/coqui-ai/STT";
description = "A library for doing speech recognition using a Coqui STT model";
license = licenses.mpl20;
};
}