1{ 2 lib, 3 beancount, 4 click, 5 buildPythonPackage, 6 fetchFromGitHub, 7 python-dateutil, 8 pytestCheckHook, 9 setuptools, 10 tatsu-lts, 11}: 12buildPythonPackage { 13 pname = "beanquery"; 14 version = "0.1.0-unstable-2025-01-10"; 15 pyproject = true; 16 17 src = fetchFromGitHub { 18 owner = "beancount"; 19 repo = "beanquery"; 20 # Pinned at commit where tatsu dependency replaced with tatsu-lts 21 # Later snapsot versions break fava build due to API changes at beanquery/shell.py 22 rev = "e77a67996a54eef2e9d77b6352c74a40164e281d"; 23 hash = "sha256-XYfKAscm55lY4YjIGTQ6RMFnCPWemfszpheGQ9qjMiM="; 24 }; 25 26 build-system = [ setuptools ]; 27 28 dependencies = [ 29 beancount 30 click 31 python-dateutil 32 tatsu-lts 33 ]; 34 35 nativeCheckInputs = [ pytestCheckHook ]; 36 37 pythonImportsCheck = [ 38 "beanquery" 39 ]; 40 41 meta = with lib; { 42 homepage = "https://github.com/beancount/beanquery"; 43 description = "Beancount Query Language"; 44 longDescription = '' 45 A customizable light-weight SQL query tool that works on tabular data, 46 including Beancount. 47 ''; 48 license = licenses.gpl2Only; 49 maintainers = with maintainers; [ alapshin ]; 50 mainProgram = "bean-query"; 51 }; 52}