diff options
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/python-modules/compressed-rtf/default.nix | 46 | ||||
-rw-r--r-- | pkgs/development/python-modules/ebcdic/default.nix | 51 | ||||
-rw-r--r-- | pkgs/development/python-modules/extract-msg/default.nix | 70 | ||||
-rw-r--r-- | pkgs/development/python-modules/red-black-tree-mod/default.nix | 38 | ||||
-rw-r--r-- | pkgs/development/python-modules/rtfde/default.nix | 51 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 12 |
6 files changed, 267 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/compressed-rtf/default.nix b/pkgs/development/python-modules/compressed-rtf/default.nix new file mode 100644 index 0000000000000..2f149d1aac1fb --- /dev/null +++ b/pkgs/development/python-modules/compressed-rtf/default.nix @@ -0,0 +1,46 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +, setuptools +}: + +buildPythonPackage rec { + pname = "compressed-rtf"; + version = "1.0.6-unstable-2023-10-15"; + pyproject = true; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "delimitry"; + repo = "compressed_rtf"; + # https://github.com/delimitry/compressed_rtf/issues/15 + rev = "581400c1b4c69ab0d944cfb5ca82c32059bbcc96"; + hash = "sha256-ivvND+cOCAmRyO8yL0+WhFY/2OkrJ+E/o4xWWd7ivHA="; + }; + + nativeBuildInputs = [ + setuptools + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "compressed_rtf" + ]; + + pytestFlagsArray = [ + "tests/tests.py" + ]; + + meta = with lib; { + description = "Compressed Rich Text Format (RTF) compression and decompression"; + homepage = "https://github.com/delimitry/compressed_rtf"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/ebcdic/default.nix b/pkgs/development/python-modules/ebcdic/default.nix new file mode 100644 index 0000000000000..430ebfe24c58b --- /dev/null +++ b/pkgs/development/python-modules/ebcdic/default.nix @@ -0,0 +1,51 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, setuptools +, pythonOlder +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "ebcdic"; + version = "1.1.1"; + pyproject = true; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "roskakori"; + repo = "CodecMapper"; + rev = "refs/tags/v${version}"; + hash = "sha256-gRyZychcF3wYocgVbdF255cSuZh/cl8X0WH/Iplkmxc="; + }; + + sourceRoot = "${src.name}/${pname}"; + + nativeBuildInputs = [ + setuptools + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + disabledTests = [ + # https://github.com/roskakori/CodecMapper/issues/18 + "test_can_lookup_ebcdic_codec" + "test_can_recode_euro_sign" + "test_has_codecs" + "test_has_ignored_codec_names" + ]; + + pythonImportsCheck = [ + "ebcdic" + ]; + + meta = with lib; { + description = "Additional EBCDIC codecs"; + homepage = "https://github.com/roskakori/CodecMapper/tree/master/ebcdic"; + license = licenses.bsd2; + maintainers = with maintainers; [ fab ]; + }; +} 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/development/python-modules/red-black-tree-mod/default.nix b/pkgs/development/python-modules/red-black-tree-mod/default.nix new file mode 100644 index 0000000000000..dd17a45bc8ea3 --- /dev/null +++ b/pkgs/development/python-modules/red-black-tree-mod/default.nix @@ -0,0 +1,38 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pytestCheckHook +, pythonOlder +, setuptools +}: + +buildPythonPackage rec { + pname = "red-black-tree-mod"; + version = "1.22"; + pyproject = true; + + disabled = pythonOlder "3.7"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-OONlKQOiv5Y3nCfCCCygt7kFFYZi3X7wyX9P2TqaqQg="; + }; + + nativeBuildInputs = [ + setuptools + ]; + + # Module has no test + doCheck = false; + + pythonImportsCheck = [ + "red_black_dict_mod" + ]; + + meta = with lib; { + description = "Flexible python implementation of red black trees"; + homepage = "https://stromberg.dnsalias.org/~strombrg/red-black-tree-mod/"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/rtfde/default.nix b/pkgs/development/python-modules/rtfde/default.nix new file mode 100644 index 0000000000000..c986d7b0c5e3e --- /dev/null +++ b/pkgs/development/python-modules/rtfde/default.nix @@ -0,0 +1,51 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, lark +, lxml +, oletools +, pytestCheckHook +, pythonOlder +, setuptools +}: + +buildPythonPackage rec { + pname = "rtfde"; + version = "0.1.1"; + pyproject = true; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "seamustuohy"; + repo = "RTFDE"; + rev = "refs/tags/${version}"; + hash = "sha256-ai9JQ3gphY/IievBNdHiblIpc0IPS9wp7CVvBIRzG/4="; + }; + + nativeBuildInputs = [ + setuptools + ]; + + propagatedBuildInputs = [ + lark + oletools + ]; + + nativeCheckInputs = [ + lxml + pytestCheckHook + ]; + + pythonImportsCheck = [ + "RTFDE" + ]; + + meta = with lib; { + description = "Library for extracting encapsulated HTML and plain text content from the RTF bodies"; + homepage = "https://github.com/seamustuohy/RTFDE"; + changelog = "https://github.com/seamustuohy/RTFDE/releases/tag/${version}"; + license = licenses.lgpl3Only; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d856a94e0847d..a2fbbf351a1c1 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2355,6 +2355,8 @@ self: super: with self; { compressai = callPackage ../development/python-modules/compressai { }; + compressed-rtf = callPackage ../development/python-modules/compressed-rtf { }; + concurrent-log-handler = callPackage ../development/python-modules/concurrent-log-handler { }; conda = callPackage ../development/python-modules/conda { }; @@ -3602,6 +3604,8 @@ self: super: with self; { ebaysdk = callPackage ../development/python-modules/ebaysdk { }; + ebcdic = callPackage ../development/python-modules/ebcdic { }; + ebooklib = callPackage ../development/python-modules/ebooklib { }; ec2instanceconnectcli = callPackage ../tools/virtualization/ec2instanceconnectcli { }; @@ -3904,6 +3908,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 { @@ -6933,6 +6939,8 @@ self: super: with self; { mailmanclient = callPackage ../development/python-modules/mailmanclient { }; + rtfde = callPackage ../development/python-modules/rtfde { }; + rtfunicode = callPackage ../development/python-modules/rtfunicode { }; rtmixer = callPackage ../development/python-modules/rtmixer { }; @@ -6949,7 +6957,7 @@ self: super: with self; { mako = callPackage ../development/python-modules/mako { }; - malduck= callPackage ../development/python-modules/malduck { }; + malduck = callPackage ../development/python-modules/malduck { }; managesieve = callPackage ../development/python-modules/managesieve { }; @@ -12778,6 +12786,8 @@ self: super: with self; { recursive-pth-loader = toPythonModule (callPackage ../development/python-modules/recursive-pth-loader { }); + red-black-tree-mod = callPackage ../development/python-modules/red-black-tree-mod { }; + redbaron = callPackage ../development/python-modules/redbaron { }; redis = callPackage ../development/python-modules/redis { }; |