From ecee71479aa155d0a0c8ab1d6a4af1ed68709c1a Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 18 Apr 2022 14:37:03 +0200 Subject: [PATCH] python3Packages.beancount-black: init at 0.1.13 --- .../beancount-black/default.nix | 48 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + pkgs/top-level/python-packages.nix | 2 + 3 files changed, 52 insertions(+) create mode 100644 pkgs/development/python-modules/beancount-black/default.nix diff --git a/pkgs/development/python-modules/beancount-black/default.nix b/pkgs/development/python-modules/beancount-black/default.nix new file mode 100644 index 000000000000..81bc8bc05822 --- /dev/null +++ b/pkgs/development/python-modules/beancount-black/default.nix @@ -0,0 +1,48 @@ +{ lib +, fetchFromGitHub +, buildPythonPackage +, pythonOlder +, beancount-parser +, click +, poetry-core +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "beancount-black"; + version = "0.1.13"; + + disabled = pythonOlder "3.9"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "LaunchPlatform"; + repo = "beancount-black"; + rev = version; + sha256 = "sha256-jhcPR+5+e8d9cbcXC//xuBwmZ14xtXNlYtmH5yNSU0E="; + }; + + buildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + beancount-parser + click + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "beancount_black" + ]; + + meta = with lib; { + description = "Opinioned code formatter for Beancount"; + homepage = "https://github.com/LaunchPlatform/beancount-black/"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ ambroisie ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0f210979796a..3708eaa9e195 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -33971,6 +33971,8 @@ with pkgs; beancount = with python3.pkgs; toPythonApplication beancount; + beancount-black = with python3.pkgs; toPythonApplication beancount-black; + beancount-language-server = callPackage ../development/tools/beancount-language-server {}; bean-add = callPackage ../applications/office/beancount/bean-add.nix { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 19c04338e65f..8f185b18634d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1188,6 +1188,8 @@ self: super: with self; { beancount = callPackage ../development/python-modules/beancount { }; + beancount-black = callPackage ../development/python-modules/beancount-black { }; + beancount-parser = callPackage ../development/python-modules/beancount-parser { }; beancount_docverif = callPackage ../development/python-modules/beancount_docverif { };