2024-07-09 21:27:47 +02:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
beancount,
|
|
|
|
click,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
python-dateutil,
|
|
|
|
pytestCheckHook,
|
|
|
|
setuptools,
|
2025-02-06 12:22:08 +01:00
|
|
|
tatsu-lts,
|
2024-07-09 21:27:47 +02:00
|
|
|
}:
|
2025-02-06 12:22:08 +01:00
|
|
|
buildPythonPackage {
|
2024-07-09 21:27:47 +02:00
|
|
|
pname = "beanquery";
|
2025-02-06 12:22:08 +01:00
|
|
|
version = "0.1.0-unstable-2025-01-10";
|
2024-07-09 21:27:47 +02:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "beancount";
|
|
|
|
repo = "beanquery";
|
2025-02-06 12:22:08 +01:00
|
|
|
# Pinned at commit where tatsu dependency replaced with tatsu-lts
|
|
|
|
# Later snapsot versions break fava build due to API changes at beanquery/shell.py
|
|
|
|
rev = "e77a67996a54eef2e9d77b6352c74a40164e281d";
|
|
|
|
hash = "sha256-XYfKAscm55lY4YjIGTQ6RMFnCPWemfszpheGQ9qjMiM=";
|
2024-07-09 21:27:47 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
beancount
|
|
|
|
click
|
|
|
|
python-dateutil
|
2025-02-06 12:22:08 +01:00
|
|
|
tatsu-lts
|
2024-07-09 21:27:47 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"beanquery"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/beancount/beanquery";
|
|
|
|
description = "Beancount Query Language";
|
|
|
|
longDescription = ''
|
|
|
|
A customizable light-weight SQL query tool that works on tabular data,
|
|
|
|
including Beancount.
|
|
|
|
'';
|
|
|
|
license = licenses.gpl2Only;
|
|
|
|
maintainers = with maintainers; [ alapshin ];
|
|
|
|
mainProgram = "bean-query";
|
|
|
|
};
|
|
|
|
}
|