Skip to content

Commit

Permalink
python312Packages.mammoth: init at 1.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Dec 17, 2024
1 parent c0f4824 commit cd4dff8
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
57 changes: 57 additions & 0 deletions pkgs/development/python-modules/mammoth/default.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };
Expand Down

0 comments on commit cd4dff8

Please sign in to comment.