diff options
author | Fabian Affolter <mail@fabian-affolter.ch> | 2024-03-18 10:34:11 +0100 |
---|---|---|
committer | Fabian Affolter <mail@fabian-affolter.ch> | 2024-03-18 10:34:11 +0100 |
commit | 0a80980fbf4edadb28a365682920e8be4253145b (patch) | |
tree | cef9d9a07ef5de116cb56ac01903e1181ecedf7c /pkgs | |
parent | 6a611883d6ce5764963e9a40ddf1316b8d445821 (diff) |
python311Packages.extract-msg: init at 0.48.2
Extracts emails and attachments saved in Microsoft Outlook's .msg files https://github.com/TeamMsgExtractor/msg-extractor
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/python-modules/extract-msg/default.nix | 70 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 2 |
2 files changed, 72 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/extract-msg/default.nix b/pkgs/development/python-modules/extract-msg/default.nix new file mode 100644 index 0000000000000..f6945405fe1ee --- /dev/null +++ b/pkgs/development/python-modules/extract-msg/default.nix @@ -0,0 +1,70 @@ +{ lib +, beautifulsoup4 +, buildPythonPackage +, compressed-rtf +, ebcdic +, fetchFromGitHub +, olefile +, pytestCheckHook +, pythonOlder +, pythonRelaxDepsHook +, red-black-tree-mod +, rtfde +, setuptools +, tzlocal +}: + +buildPythonPackage rec { + pname = "extract-msg"; + version = "0.48.2"; + pyproject = true; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "TeamMsgExtractor"; + repo = "msg-extractor"; + rev = "refs/tags/v${version}"; + hash = "sha256-qCOi4CRBGF5MuGcHVUk+zb76pchZXbE1cBUIlzl9++w="; + }; + + pythonRelaxDeps = [ + "olefile" + "red-black-tree-mod" + ]; + + nativeBuildInputs = [ + pythonRelaxDepsHook + setuptools + ]; + + propagatedBuildInputs = [ + beautifulsoup4 + compressed-rtf + ebcdic + olefile + red-black-tree-mod + rtfde + tzlocal + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "extract_msg" + ]; + + pytestFlagsArray = [ + "extract_msg_tests/*.py" + ]; + + meta = with lib; { + description = "Extracts emails and attachments saved in Microsoft Outlook's .msg files"; + homepage = "https://github.com/TeamMsgExtractor/msg-extractor"; + changelog = "https://github.com/TeamMsgExtractor/msg-extractor/blob/${version}/CHANGELOG.md"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b0214b5d0436b..b3d0ea0acea72 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3904,6 +3904,8 @@ self: super: with self; { exitcode = callPackage ../development/python-modules/exitcode { }; + extract-msg = callPackage ../development/python-modules/extract-msg { }; + extractcode = callPackage ../development/python-modules/extractcode { }; extractcode-7z = callPackage ../development/python-modules/extractcode/7z.nix { |