1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 setuptools,
7
8 compressed-rtf,
9
10 pytestCheckHook,
11 pytest-console-scripts,
12}:
13
14buildPythonPackage rec {
15 pname = "tnefparse";
16 version = "1.4.0";
17
18 pyproject = true;
19 build-system = [ setuptools ];
20
21 src = fetchFromGitHub {
22 owner = "koodaamo";
23 repo = "tnefparse";
24 tag = version;
25 hash = "sha256-t2ouuuy6fzwb6SZNpxeGSleL/11SgTT8Ce28/ST1glw=";
26 };
27
28 optional-dependencies = {
29 compressed-rtf = [ compressed-rtf ];
30 };
31
32 nativeCheckInputs = [
33 pytestCheckHook
34 pytest-console-scripts
35
36 # tests always require this.
37 compressed-rtf
38 ];
39
40 disabledTests = [
41 # ensures there's a "optional argument" in the CLI usage, and its output has changed since.
42 "test_help_is_printed"
43 ];
44
45 pythonImportsCheck = [ "tnefparse" ];
46
47 meta = {
48 description = "TNEF decoding library written in python, without external dependencies";
49 homepage = "https://github.com/koodaamo/tnefparse";
50 changelog = "https://github.com/koodaamo/tnefparse/releases/tag/${version}";
51 license = lib.licenses.lgpl3Only;
52 maintainers = with lib.maintainers; [
53 flokli
54 ];
55 };
56}