summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/tnefparse/default.nix
blob: 0317777cc0fb29fb22ae965f492ae71c310b1978 (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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,

  setuptools,

  compressed-rtf,

  pytestCheckHook,
  pytest-console-scripts,
}:

buildPythonPackage rec {
  pname = "tnefparse";
  version = "1.4.0";

  pyproject = true;
  build-system = [ setuptools ];

  src = fetchFromGitHub {
    owner = "koodaamo";
    repo = "tnefparse";
    tag = version;
    hash = "sha256-t2ouuuy6fzwb6SZNpxeGSleL/11SgTT8Ce28/ST1glw=";
  };

  optional-dependencies = {
    compressed-rtf = [ compressed-rtf ];
  };

  nativeCheckInputs = [
    pytestCheckHook
    pytest-console-scripts

    # tests always require this.
    compressed-rtf
  ];

  disabledTests = [
    # ensures there's a "optional argument" in the CLI usage, and its output has changed since.
    "test_help_is_printed"
  ];

  pythonImportsCheck = [ "tnefparse" ];

  meta = {
    description = "TNEF decoding library written in python, without external dependencies";
    homepage = "https://github.com/koodaamo/tnefparse";
    changelog = "https://github.com/koodaamo/tnefparse/releases/tag/${version}";
    license = lib.licenses.lgpl3Only;
    maintainers = with lib.maintainers; [
      flokli
    ];
  };
}