summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/beangulp/default.nix
blob: d051c0bc622baa39f9a30b0999b7285731c28a05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
  lib,
  beancount,
  beautifulsoup4,
  buildPythonPackage,
  chardet,
  click,
  fetchFromGitHub,
  fetchpatch2,
  lxml,
  petl,
  python-magic,
  pytestCheckHook,
  setuptools,
}:

buildPythonPackage rec {
  pname = "beangulp";
  version = "0.2.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "beancount";
    repo = "beangulp";
    tag = "v${version}";
    hash = "sha256-h7xLHwEyS+tOI7v6Erp12VfVnxOf4930++zghhC3in4=";
  };

  patches = [
    (fetchpatch2 {
      url = "https://github.com/beancount/beangulp/commit/254bfb38ffed049ef8f3041bfaf01b3f5a8aa771.patch?full_index=1";
      hash = "sha256-ojysT23K0xmFafzTnRZiHkLS2ioDR/tVK02mfF7N9so=";
    })
  ];

  build-system = [ setuptools ];

  dependencies = [
    beancount
    beautifulsoup4
    chardet
    click
    lxml
    python-magic
  ];

  nativeCheckInputs = [
    petl
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "beangulp"
  ];

  meta = {
    homepage = "https://github.com/beancount/beangulp";
    description = "Importers framework for Beancount";
    longDescription = ''
      Beangulp provides a framework for importing transactions into a Beancoount
      ledger from account statements and other documents and for managing documents.
    '';
    license = lib.licenses.gpl2Only;
    maintainers = with lib.maintainers; [ alapshin ];
  };
}