From 149e3446d35cb5c6c6ee9813590a2e76511a2421 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..7788519dc78ee --- /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 + ]; + + disabledTestPaths = [ + "tests/cli_tests.py" + ]; + + 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 { };