1{ 2 lib, 3 fetchFromGitHub, 4 buildPythonPackage, 5 pythonOlder, 6 pytestCheckHook, 7 beancount-black, 8 beancount-parser, 9 beanhub-extract, 10 hatchling, 11 jinja2, 12 pydantic, 13 pytz, 14 pyyaml, 15}: 16 17buildPythonPackage rec { 18 pname = "beanhub-import"; 19 version = "1.2.0"; 20 pyproject = true; 21 22 disabled = pythonOlder "3.9"; 23 24 src = fetchFromGitHub { 25 owner = "LaunchPlatform"; 26 repo = "beanhub-import"; 27 tag = version; 28 hash = "sha256-oExJ8BWJmJkJMGGIYp+Xtf0rzUcQKD8YKo51E+KbRN0="; 29 }; 30 31 build-system = [ hatchling ]; 32 33 pythonRelaxDeps = [ 34 # pytz>=2023.1,<2025, but we have 2025.1 35 "pytz" 36 ]; 37 38 dependencies = [ 39 beancount-black 40 beancount-parser 41 beanhub-extract 42 jinja2 43 pydantic 44 pytz 45 pyyaml 46 ]; 47 48 nativeCheckInputs = [ pytestCheckHook ]; 49 50 pythonImportsCheck = [ "beanhub_import" ]; 51 52 meta = { 53 description = "Declarative idempotent rule-based Beancount transaction import engine in Python"; 54 homepage = "https://github.com/LaunchPlatform/beanhub-import/"; 55 changelog = "https://github.com/LaunchPlatform/beanhub-import/releases/tag/${src.tag}"; 56 license = with lib.licenses; [ mit ]; 57 maintainers = with lib.maintainers; [ fangpen ]; 58 }; 59}