python3Packages.ingredient-parser-nlp: init at 2.0.0

This commit is contained in:
Anton Mosich
2025-04-13 20:50:17 +02:00
parent 63bf01db86
commit 8974da030a
2 changed files with 60 additions and 0 deletions
@@ -0,0 +1,58 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
nix-update-script,
setuptools,
nltk,
python-crfsuite,
pint,
floret,
pytestCheckHook,
nltk-data,
}:
buildPythonPackage rec {
pname = "ingredient-parser-nlp";
version = "2.0.0";
pyproject = true;
src = fetchFromGitHub {
owner = "strangetom";
repo = "ingredient-parser";
tag = version;
hash = "sha256-i14RKBcvU56pDNGxNVBvvpQ65FCbitMIfvN5eLLJCWU=";
};
build-system = [ setuptools ];
dependencies = [
nltk
python-crfsuite
pint
floret
];
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"ingredient_parser"
];
# Needed for tests
preCheck = ''
export NLTK_DATA=${nltk-data.averaged_perceptron_tagger_eng}
'';
meta = {
description = "Parse structured information from recipe ingredient sentences";
license = lib.licenses.mit;
homepage = "https://github.com/strangetom/ingredient-parser/";
changelog = "https://github.com/strangetom/ingredient-parser/releases/tag/${version}";
maintainers = with lib.maintainers; [ antonmosich ];
};
}
+2
View File
@@ -6630,6 +6630,8 @@ self: super: with self; {
inform = callPackage ../development/python-modules/inform { };
ingredient-parser-nlp = callPackage ../development/python-modules/ingredient-parser-nlp { };
iniconfig = callPackage ../development/python-modules/iniconfig { };
inifile = callPackage ../development/python-modules/inifile { };