Merge pull request #169195 from ambroisie/add-beancount-black

python3Packages.beancount-black: init at 0.1.13
This commit is contained in:
Ryan Lahfa 2022-12-23 18:41:20 +01:00 committed by GitHub
commit aae7365f9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 100 additions and 0 deletions

View File

@ -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 ];
};
}

View File

@ -0,0 +1,46 @@
{ lib
, fetchFromGitHub
, buildPythonPackage
, pythonOlder
, lark
, poetry-core
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "beancount-parser";
version = "0.1.21";
disabled = pythonOlder "3.9";
format = "pyproject";
src = fetchFromGitHub {
owner = "LaunchPlatform";
repo = "beancount-parser";
rev = version;
sha256 = "sha256-0uhH75OEjC9iA0XD0VX7CGoRIP/hpM4y+53JnyXgZpA=";
};
buildInputs = [
poetry-core
];
propagatedBuildInputs = [
lark
];
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"beancount_parser"
];
meta = with lib; {
description = "Standalone Lark based Beancount syntax parser";
homepage = "https://github.com/LaunchPlatform/beancount-parser/";
license = with licenses; [ mit ];
maintainers = with maintainers; [ ambroisie ];
};
}

View File

@ -33972,6 +33972,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 { };

View File

@ -1188,6 +1188,10 @@ 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 { };
beanstalkc = callPackage ../development/python-modules/beanstalkc { };