2021-01-25 09:26:54 +01:00
|
|
|
{
|
|
|
|
lib,
|
2019-07-16 20:14:17 +01:00
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
2021-06-20 19:49:01 +02:00
|
|
|
pytestCheckHook,
|
2023-06-08 22:36:14 +02:00
|
|
|
pythonOlder,
|
2019-07-16 20:14:17 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "mwparserfromhell";
|
2024-01-09 05:21:12 +00:00
|
|
|
version = "0.6.6";
|
2023-06-08 22:36:14 +02:00
|
|
|
format = "setuptools";
|
|
|
|
|
2024-01-09 05:21:12 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2019-07-16 20:14:17 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-01-09 05:21:12 +00:00
|
|
|
hash = "sha256-ca/sHpeEulduldbzSEVYLTxzOjpSuncN2KnDpA5bZJ8=";
|
2019-07-16 20:14:17 +01:00
|
|
|
};
|
|
|
|
|
2023-06-08 22:36:14 +02:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace '"pytest-runner"' ""
|
|
|
|
'';
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2023-06-08 22:36:14 +02:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "mwparserfromhell" ];
|
2021-06-20 19:49:01 +02:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2019-07-16 20:14:17 +01:00
|
|
|
description = "MWParserFromHell is a parser for MediaWiki wikicode";
|
2023-06-08 22:36:14 +02:00
|
|
|
homepage = "https://mwparserfromhell.readthedocs.io/";
|
|
|
|
changelog = "https://github.com/earwig/mwparserfromhell/releases/tag/v${version}";
|
2019-07-16 20:14:17 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ melling ];
|
|
|
|
};
|
|
|
|
}
|