1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 pythonOlder,
6 lark,
7 poetry-core,
8 pytestCheckHook,
9}:
10
11buildPythonPackage rec {
12 pname = "beancount-parser";
13 version = "1.2.3";
14 format = "pyproject";
15
16 disabled = pythonOlder "3.9";
17
18 src = fetchFromGitHub {
19 owner = "LaunchPlatform";
20 repo = "beancount-parser";
21 tag = version;
22 hash = "sha256-8YcrsLdSRTixKXU/IM821kNcBo0jB/8DXA1/KiedsBY=";
23 };
24
25 buildInputs = [ poetry-core ];
26
27 propagatedBuildInputs = [ lark ];
28
29 nativeCheckInputs = [ pytestCheckHook ];
30
31 pythonImportsCheck = [ "beancount_parser" ];
32
33 meta = with lib; {
34 description = "Standalone Lark based Beancount syntax parser";
35 homepage = "https://github.com/LaunchPlatform/beancount-parser/";
36 changelog = "https://github.com/LaunchPlatform/beancount-parser/releases/tag/${version}";
37 license = with licenses; [ mit ];
38 maintainers = with maintainers; [ ambroisie ];
39 };
40}