nixpkgs/pkgs/development/python-modules/beanhub-cli/default.nix
Robert Schütz 1a04744f74 treewide: remove superfluous disabled
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:

    pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
    for f in $(find -name '*.nix'); do
        grep -q "$pattern" "$f" || continue
        sed -i "/$pattern/d" "$f"
        if [ $(grep -c pythonOlder "$f") == 1 ]; then
            sed -i '/^\s*pythonOlder,\s*$/d' "$f"
        fi
        nixfmt "$f"
    done
2026-01-11 09:34:20 -08:00

112 lines
1.9 KiB
Nix

{
lib,
fetchFromGitHub,
buildPythonPackage,
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;
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.concatAttrValues 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.concatAttrValues 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";
};
}