72 lines
1.3 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
beautifulsoup4,
extruct,
isodate,
language-tags,
regex,
requests,
pytestCheckHook,
responses,
setuptools,
pythonOlder,
nixosTests,
}:
buildPythonPackage rec {
pname = "recipe-scrapers";
version = "15.9.0";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "hhursev";
repo = "recipe-scrapers";
tag = version;
hash = "sha256-pbcIAr0yKGSWfuVMsOfriUUW1dhlvjX2JfDPJ8akldg=";
};
build-system = [ setuptools ];
dependencies = [
beautifulsoup4
extruct
isodate
language-tags
regex
];
optional-dependencies = {
online = [ requests ];
};
nativeCheckInputs = [
pytestCheckHook
responses
];
disabledTests = [
# Fixture is broken
"test_instructions"
];
pythonImportsCheck = [ "recipe_scrapers" ];
passthru = {
tests = {
inherit (nixosTests) mealie tandoor-recipes;
};
};
meta = with lib; {
description = "Python package for scraping recipes data";
homepage = "https://github.com/hhursev/recipe-scrapers";
changelog = "https://github.com/hhursev/recipe-scrapers/releases/tag/${src.tag}";
license = licenses.mit;
maintainers = with maintainers; [ ambroisie ];
};
}