summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/rtfde/default.nix
blob: 5f93e2f61e36598e99c0f4d7bc1a5afdf6b3daf3 (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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  lark,
  lxml,
  oletools,
  pytestCheckHook,
  setuptools,
}:

buildPythonPackage rec {
  pname = "rtfde";
  version = "0.1.2.2";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "seamustuohy";
    repo = "RTFDE";
    tag = version;
    hash = "sha256-1yjxp6N07I9kwFRtgsLo9UPSG4FU+ic1tNm6U/xWk74=";
  };

  build-system = [ setuptools ];

  pythonRelaxDeps = [ "lark" ];

  dependencies = [
    lark
    oletools
  ];

  nativeCheckInputs = [
    lxml
    pytestCheckHook
  ];

  pythonImportsCheck = [ "RTFDE" ];

  disabledTests = [
    # Malformed encapsulated RTF discovered
    "test_encoded_bytes_stay_encoded_character"
  ];

  meta = {
    changelog = "https://github.com/seamustuohy/RTFDE/releases/tag/${src.tag}";
    description = "Library for extracting encapsulated HTML and plain text content from the RTF bodies";
    homepage = "https://github.com/seamustuohy/RTFDE";
    license = lib.licenses.lgpl3Only;
    maintainers = with lib.maintainers; [ fab ];
  };
}