nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 beancount,
4 beautifulsoup4,
5 buildPythonPackage,
6 chardet,
7 click,
8 fetchFromGitHub,
9 fetchpatch2,
10 lxml,
11 petl,
12 python-magic,
13 pytestCheckHook,
14 setuptools,
15}:
16
17buildPythonPackage rec {
18 pname = "beangulp";
19 version = "0.2.0";
20 pyproject = true;
21
22 src = fetchFromGitHub {
23 owner = "beancount";
24 repo = "beangulp";
25 tag = "v${version}";
26 hash = "sha256-h7xLHwEyS+tOI7v6Erp12VfVnxOf4930++zghhC3in4=";
27 };
28
29 patches = [
30 (fetchpatch2 {
31 url = "https://github.com/beancount/beangulp/commit/254bfb38ffed049ef8f3041bfaf01b3f5a8aa771.patch?full_index=1";
32 hash = "sha256-ojysT23K0xmFafzTnRZiHkLS2ioDR/tVK02mfF7N9so=";
33 })
34 ];
35
36 build-system = [ setuptools ];
37
38 dependencies = [
39 beancount
40 beautifulsoup4
41 chardet
42 click
43 lxml
44 python-magic
45 ];
46
47 nativeCheckInputs = [
48 petl
49 pytestCheckHook
50 ];
51
52 pythonImportsCheck = [
53 "beangulp"
54 ];
55
56 meta = {
57 homepage = "https://github.com/beancount/beangulp";
58 description = "Importers framework for Beancount";
59 longDescription = ''
60 Beangulp provides a framework for importing transactions into a Beancoount
61 ledger from account statements and other documents and for managing documents.
62 '';
63 license = lib.licenses.gpl2Only;
64 maintainers = with lib.maintainers; [ alapshin ];
65 };
66}