diff options
Diffstat (limited to 'pkgs/development')
5 files changed, 256 insertions, 0 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 ]; + }; +} |