1{ lib
2, fetchFromGitHub
3, buildPythonPackage
4, pythonOlder
5, beancount-parser
6, click
7, poetry-core
8, pytestCheckHook
9}:
10
11buildPythonPackage rec {
12 pname = "beancount-black";
13 version = "0.2.1";
14
15 disabled = pythonOlder "3.9";
16 format = "pyproject";
17
18 src = fetchFromGitHub {
19 owner = "LaunchPlatform";
20 repo = "beancount-black";
21 rev = version;
22 hash = "sha256-wvAQnwnyHn5Koc/UN4zpJ3JDmFbDoUrpCTmJCpSP7Mg=";
23 };
24
25 buildInputs = [
26 poetry-core
27 ];
28
29 propagatedBuildInputs = [
30 beancount-parser
31 click
32 ];
33
34 nativeCheckInputs = [
35 pytestCheckHook
36 ];
37
38 pythonImportsCheck = [
39 "beancount_black"
40 ];
41
42 meta = with lib; {
43 description = "Opinioned code formatter for Beancount";
44 homepage = "https://github.com/LaunchPlatform/beancount-black/";
45 license = with licenses; [ mit ];
46 maintainers = with maintainers; [ ambroisie ];
47 };
48}