uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
96
pkgs/development/python-modules/gruut/default.nix
Normal file
96
pkgs/development/python-modules/gruut/default.nix
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, callPackage
|
||||
, pythonOlder
|
||||
, fetchFromGitHub
|
||||
, babel
|
||||
, gruut-ipa
|
||||
, dateparser
|
||||
, jsonlines
|
||||
, num2words
|
||||
, python-crfsuite
|
||||
, dataclasses
|
||||
, python
|
||||
, networkx
|
||||
, glibcLocales
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
let
|
||||
langPkgs = [
|
||||
"ar"
|
||||
"cs"
|
||||
"de"
|
||||
"en"
|
||||
"es"
|
||||
"fa"
|
||||
"fr"
|
||||
"it"
|
||||
"lb"
|
||||
"nl"
|
||||
"pt"
|
||||
"ru"
|
||||
"sv"
|
||||
"sw"
|
||||
];
|
||||
in
|
||||
buildPythonPackage rec {
|
||||
pname = "gruut";
|
||||
version = "2.2.3";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rhasspy";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-B5fPUW4YaMzDDXxncfrWwxGdUizuaxnPImNMf1ZZJ/I=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace requirements.txt \
|
||||
--replace "dateparser~=1.0.0" "dateparser" \
|
||||
--replace "gruut_lang_en~=2.0.0" "gruut_lang_en" \
|
||||
--replace "jsonlines~=1.2.0" "jsonlines"
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
babel
|
||||
gruut-ipa
|
||||
jsonlines
|
||||
num2words
|
||||
python-crfsuite
|
||||
dateparser
|
||||
networkx
|
||||
] ++ lib.optionals (pythonOlder "3.7") [
|
||||
dataclasses
|
||||
] ++ (map (lang: callPackage ./language-pack.nix {
|
||||
inherit lang version format src;
|
||||
}) langPkgs);
|
||||
|
||||
checkInputs = [ glibcLocales pytestCheckHook ];
|
||||
|
||||
disabledTests = [
|
||||
# https://github.com/rhasspy/gruut/issues/25
|
||||
"test_lexicon_external"
|
||||
|
||||
# requires mishkal library
|
||||
"test_fa"
|
||||
"test_ar"
|
||||
"test_lb"
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
export LC_ALL=en_US.utf-8
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [
|
||||
"gruut"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A tokenizer, text cleaner, and phonemizer for many human languages";
|
||||
homepage = "https://github.com/rhasspy/gruut";
|
||||
license = licenses.mit;
|
||||
maintainers = teams.tts.members;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue