Files
nixpkgs/pkgs/development/python-modules/gruut-ipa/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

44 lines
980 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
espeak,
numpy,
python,
unittestCheckHook,
}:
buildPythonPackage rec {
pname = "gruut-ipa";
version = "0.13.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "rhasspy";
repo = "gruut-ipa";
rev = "v${version}";
hash = "sha256-Q2UKELoG8OaAPxIrZNCpXgeWZ2fCzb3g3SOVzCm/gg0=";
};
postPatch = ''
patchShebangs bin/*
substituteInPlace bin/speak-ipa \
--replace '${"\${src_dir}:"}' "$out/${python.sitePackages}:" \
--replace "do espeak" "do ${espeak}/bin/espeak"
'';
propagatedBuildInputs = [ numpy ];
nativeCheckInputs = [ unittestCheckHook ];
pythonImportsCheck = [ "gruut_ipa" ];
meta = {
description = "Library for manipulating pronunciations using the International Phonetic Alphabet (IPA)";
mainProgram = "gruut-ipa";
homepage = "https://github.com/rhasspy/gruut-ipa";
license = lib.licenses.mit;
teams = [ lib.teams.tts ];
};
}