|
1 | 1 | { |
2 | 2 | lib, |
| 3 | + bison, |
3 | 4 | buildPythonPackage, |
4 | | - fetchPypi, |
5 | | - isPy3k, |
6 | | - beautifulsoup4, |
7 | | - bottle, |
8 | | - chardet, |
| 5 | + click, |
| 6 | + fetchFromGitHub, |
| 7 | + flex, |
| 8 | + gnupg, |
| 9 | + meson, |
| 10 | + meson-python, |
| 11 | + pytestCheckHook, |
9 | 12 | python-dateutil, |
10 | | - google-api-python-client, |
11 | | - google-auth-oauthlib, |
12 | | - lxml, |
13 | | - oauth2client, |
14 | | - ply, |
15 | | - pytest, |
16 | | - python-magic, |
17 | | - requests, |
| 13 | + regex, |
18 | 14 | }: |
19 | 15 |
|
20 | 16 | buildPythonPackage rec { |
21 | | - version = "2.3.6"; |
22 | | - format = "setuptools"; |
| 17 | + version = "3.1.0"; |
23 | 18 | pname = "beancount"; |
| 19 | + pyproject = true; |
24 | 20 |
|
25 | | - disabled = !isPy3k; |
26 | | - |
27 | | - src = fetchPypi { |
28 | | - inherit pname version; |
29 | | - hash = "sha256-gB+Tvta1fS4iQ2aIxInVob8fduIQ887RhoB1fmDTR1o="; |
| 21 | + src = fetchFromGitHub { |
| 22 | + owner = "beancount"; |
| 23 | + repo = "beancount"; |
| 24 | + tag = version; |
| 25 | + hash = "sha256-ogjBW/NGlMmhYlzcx3EWWoVi+OOEv2Wm49tzwMiNb8A="; |
30 | 26 | }; |
31 | 27 |
|
32 | | - # Tests require files not included in the PyPI archive. |
33 | | - doCheck = false; |
| 28 | + build-system = [ |
| 29 | + meson |
| 30 | + meson-python |
| 31 | + ]; |
34 | 32 |
|
35 | | - propagatedBuildInputs = [ |
36 | | - beautifulsoup4 |
37 | | - bottle |
38 | | - chardet |
| 33 | + dependencies = [ |
| 34 | + click |
39 | 35 | python-dateutil |
40 | | - google-api-python-client |
41 | | - google-auth-oauthlib |
42 | | - lxml |
43 | | - oauth2client |
44 | | - ply |
45 | | - python-magic |
46 | | - requests |
47 | | - # pytest really is a runtime dependency |
48 | | - # https://github.com/beancount/beancount/blob/v2/setup.py#L81-L82 |
49 | | - pytest |
| 36 | + regex |
| 37 | + ]; |
| 38 | + |
| 39 | + nativeBuildInputs = [ |
| 40 | + bison |
| 41 | + flex |
50 | 42 | ]; |
51 | 43 |
|
52 | | - # beancount cannot be directly bumped to 3.x |
53 | | - # e.g. https://github.com/NixOS/nixpkgs/issues/380197 |
54 | | - passthru.skipBulkUpdate = true; |
| 44 | + nativeCheckInputs = [ |
| 45 | + gnupg |
| 46 | + pytestCheckHook |
| 47 | + ]; |
| 48 | + |
| 49 | + preCheck = '' |
| 50 | + # avoid local paths, relative imports wont resolve correctly |
| 51 | + mv beancount tests |
| 52 | + ''; |
| 53 | + |
| 54 | + pythonImportsCheck = [ "beancount" ]; |
55 | 55 |
|
56 | | - meta = with lib; { |
| 56 | + meta = { |
57 | 57 | homepage = "https://github.com/beancount/beancount"; |
| 58 | + changelog = "https://github.com/beancount/beancount/releases/tag/${src.tag}"; |
58 | 59 | description = "Double-entry bookkeeping computer language"; |
59 | 60 | longDescription = '' |
60 | 61 | A double-entry bookkeeping computer language that lets you define |
61 | 62 | financial transaction records in a text file, read them in memory, |
62 | 63 | generate a variety of reports from them, and provides a web interface. |
63 | 64 | ''; |
64 | | - license = licenses.gpl2Only; |
65 | | - maintainers = with maintainers; [ |
66 | | - sharzy |
67 | | - polarmutex |
68 | | - ]; |
| 65 | + license = lib.licenses.gpl2Only; |
| 66 | + maintainers = with lib.maintainers; [ alapshin ]; |
69 | 67 | }; |
70 | 68 | } |
0 commit comments