1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pytestCheckHook,
6 pythonOlder,
7}:
8
9buildPythonPackage rec {
10 pname = "mwparserfromhell";
11 version = "0.7.2";
12 format = "setuptools";
13
14 disabled = pythonOlder "3.8";
15
16 src = fetchPypi {
17 inherit pname version;
18 hash = "sha256-9Bkwcunqk7noj3cvYKAhJcBgLTKJDQu9yyde1YyLN2M=";
19 };
20
21 postPatch = ''
22 substituteInPlace setup.py \
23 --replace '"pytest-runner"' ""
24 '';
25
26 nativeCheckInputs = [ pytestCheckHook ];
27
28 pythonImportsCheck = [ "mwparserfromhell" ];
29
30 meta = with lib; {
31 description = "MWParserFromHell is a parser for MediaWiki wikicode";
32 homepage = "https://mwparserfromhell.readthedocs.io/";
33 changelog = "https://github.com/earwig/mwparserfromhell/releases/tag/v${version}";
34 license = licenses.mit;
35 maintainers = with maintainers; [ melling ];
36 };
37}