From 4b900d4f8a1dc34f574463aa999fddc13a404139 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Mon, 16 Dec 2024 21:08:30 +0100 Subject: [PATCH] python312Packages.markitdown: 0-unstable-2024-12-15 --- .../python-modules/markitdown/default.nix | 65 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 67 insertions(+) create mode 100644 pkgs/development/python-modules/markitdown/default.nix diff --git a/pkgs/development/python-modules/markitdown/default.nix b/pkgs/development/python-modules/markitdown/default.nix new file mode 100644 index 0000000000000..5143dbae9aacd --- /dev/null +++ b/pkgs/development/python-modules/markitdown/default.nix @@ -0,0 +1,65 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + hatchling, + beautifulsoup4, + mammoth, + markdownify, + numpy, + openpyxl, + pandas, + pathvalidate, + pdfminer-six, + puremagic, + pydub, + python-pptx, + requests, + speechrecognition, + youtube-transcript-api, +}: + +buildPythonPackage rec { + pname = "markitdown"; + version = "unstable-2024-12-15"; + pyproject = true; + + src = fetchFromGitHub { + owner = "microsoft"; + repo = "markitdown"; + rev = "81e3f24acd0049a59cd2dcb2d01d0a98cc57c734"; + hash = "sha256-ejj7ARvLDzB1WRNkc1zUtzYAujZVysB0MkY/PQKv/nQ="; + }; + + build-system = [ + hatchling + ]; + + dependencies = [ + beautifulsoup4 + mammoth + markdownify + numpy + openpyxl + pandas + pathvalidate + pdfminer-six + puremagic + pydub + python-pptx + requests + speechrecognition + youtube-transcript-api + ]; + + pythonImportsCheck = [ + "markitdown" + ]; + + meta = { + description = "Python tool for converting files and office documents to Markdown"; + homepage = "https://github.com/microsoft/markitdown"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2b5851af1f9c5..1c7bac9b18698 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7851,6 +7851,8 @@ self: super: with self; { markdownify = callPackage ../development/python-modules/markdownify { }; + markitdown = callPackage ../development/python-modules/markitdown { }; + marko = callPackage ../development/python-modules/marko { }; markupsafe = callPackage ../development/python-modules/markupsafe { };