From cd4dff895ef367479c1501ce669251e7a51aae60 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Mon, 16 Dec 2024 21:08:05 +0100 Subject: [PATCH] python312Packages.mammoth: init at 1.8.0 --- .../python-modules/mammoth/default.nix | 57 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 59 insertions(+) create mode 100644 pkgs/development/python-modules/mammoth/default.nix diff --git a/pkgs/development/python-modules/mammoth/default.nix b/pkgs/development/python-modules/mammoth/default.nix new file mode 100644 index 0000000000000..edb1a5299e50b --- /dev/null +++ b/pkgs/development/python-modules/mammoth/default.nix @@ -0,0 +1,57 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + cobble, + funk, + pytestCheckHook, + spur, + tempman, + gitUpdater, +}: + +buildPythonPackage rec { + pname = "mammoth"; + version = "1.8.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "mwilliamson"; + repo = "python-mammoth"; + tag = version; + hash = "sha256-mIvzEyKpy1j7tZti+QTXgsbqqZAhYs7N+p5sQFsLhBg="; + }; + + postPatch = '' + substituteInPlace setup.py \ + --replace-fail 'read("README")' '""' + ''; + + build-system = [ setuptools ]; + + dependencies = [ cobble ]; + + pythonImportsCheck = [ "mammoth" ]; + + nativeCheckInputs = [ + funk + pytestCheckHook + spur + tempman + ]; + + preCheck = '' + export PATH=$out/bin:$PATH + ''; + + passthru.updateScripts = gitUpdater { }; + + meta = { + description = "Convert Word documents (.docx files) to HTML"; + homepage = "https://github.com/mwilliamson/python-mammoth"; + changelog = "https://github.com/mwilliamson/python-mammoth/blob/${src.tag}/NEWS"; + license = lib.licenses.bsd2; + maintainers = with lib.maintainers; [ drupol ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 700a02c64aa63..4a807b9781e5c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7807,6 +7807,8 @@ self: super: with self; { malduck = callPackage ../development/python-modules/malduck { }; + mammoth = callPackage ../development/python-modules/mammoth { }; + mamba-ssm = callPackage ../development/python-modules/mamba-ssm { }; managesieve = callPackage ../development/python-modules/managesieve { };