depot/third_party/nixpkgs/pkgs/development/python-modules/mwparserfromhell/default.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

40 lines
851 B
Nix

{ lib
, buildPythonPackage
, fetchPypi
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "mwparserfromhell";
version = "0.6.5";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-K60L/2FFdjmeRHDWQAuinFLVlWgqS43mQq+7W+v0o0Y=";
};
postPatch = ''
substituteInPlace setup.py \
--replace '"pytest-runner"' ""
'';
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"mwparserfromhell"
];
meta = with lib; {
description = "MWParserFromHell is a parser for MediaWiki wikicode";
homepage = "https://mwparserfromhell.readthedocs.io/";
changelog = "https://github.com/earwig/mwparserfromhell/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ melling ];
};
}