Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

116 lines
2.0 KiB
Nix

{
lib,
fetchFromGitHub,
buildPythonPackage,
pythonOlder,
hatchling,
# dependencies
beancount-black,
beancount-parser,
beanhub-forms,
beanhub-import,
beanhub-inbox,
click,
fastapi,
jinja2,
pydantic-settings,
pydantic,
pyyaml,
rich,
starlette-wtf,
uvicorn,
# optional-dependencies
attrs,
cryptography,
httpx,
pynacl,
python-dateutil,
tomli-w,
tomli,
# tests
pytest-asyncio,
pytest-factoryboy,
pytest-httpx,
pytest-mock,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "beanhub-cli";
version = "3.0.1";
pyproject = true;
disabled = pythonOlder "3.10";
src = fetchFromGitHub {
owner = "LaunchPlatform";
repo = "beanhub-cli";
tag = version;
hash = "sha256-hreVGsptCGW6L3rj6Ec8+lefZWpQ4tZtUEJI+NxTO7w=";
};
pythonRelaxDeps = [ "rich" ];
build-system = [ hatchling ];
dependencies = [
beancount-black
beancount-parser
beanhub-forms
beanhub-import
beanhub-inbox
click
fastapi
jinja2
pydantic
pydantic-settings
pyyaml
rich
starlette-wtf
uvicorn
]
++ lib.flatten (lib.attrValues optional-dependencies);
optional-dependencies = {
login = [
attrs
httpx
python-dateutil
tomli
tomli-w
];
connect = [
attrs
cryptography
httpx
pynacl
python-dateutil
tomli
tomli-w
];
};
nativeCheckInputs = [
pytest-asyncio
pytest-factoryboy
pytest-httpx
pytest-mock
pytestCheckHook
]
++ lib.flatten (lib.attrValues optional-dependencies);
pythonImportsCheck = [ "beanhub_cli" ];
meta = {
description = "Command line tools for BeanHub or Beancount users";
homepage = "https://github.com/LaunchPlatform/beanhub-cli/";
changelog = "https://github.com/LaunchPlatform/beanhub-cli/releases/tag/${src.tag}";
license = with lib.licenses; [ mit ];
maintainers = with lib.maintainers; [ fangpen ];
mainProgram = "bh";
};
}