2021-09-26 12:46:18 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-04-27 09:35:20 +00:00
|
|
|
, fetchFromGitHub
|
2021-09-26 12:46:18 +00:00
|
|
|
, pythonOlder
|
|
|
|
, intervaltree
|
|
|
|
, pyflakes
|
|
|
|
, requests
|
|
|
|
, lxml
|
|
|
|
, google-i18n-address
|
|
|
|
, pycountry
|
|
|
|
, html5lib
|
|
|
|
, six
|
|
|
|
, kitchen
|
|
|
|
, pypdf2
|
|
|
|
, dict2xml
|
|
|
|
, weasyprint
|
|
|
|
, pyyaml
|
|
|
|
, jinja2
|
|
|
|
, configargparse
|
|
|
|
, appdirs
|
2022-04-27 09:35:20 +00:00
|
|
|
, decorator
|
|
|
|
, pycairo
|
|
|
|
, pytestCheckHook
|
|
|
|
, python-fontconfig
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "xml2rfc";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "3.14.0";
|
2021-09-26 12:46:18 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ietf-tools";
|
|
|
|
repo = "xml2rfc";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
sha256 = "sha256-BuOHQ6LnfjdlE9+wdJbl6wdD/oddKIklabVBx1IJJBA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace "SHELL := /bin/bash" "SHELL := bash" \
|
|
|
|
--replace "test flaketest" "test" \
|
|
|
|
--replace "python setup.py --quiet install" ""
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "'tox'," ""
|
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace "jinja2>=2.11,<3.0" "jinja2" \
|
|
|
|
--replace "markupsafe==2.0.1" "markupsafe"
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
intervaltree
|
2020-09-25 04:45:31 +00:00
|
|
|
jinja2
|
2020-04-24 23:36:52 +00:00
|
|
|
pyflakes
|
2020-09-25 04:45:31 +00:00
|
|
|
pyyaml
|
2020-04-24 23:36:52 +00:00
|
|
|
requests
|
|
|
|
lxml
|
|
|
|
google-i18n-address
|
|
|
|
pycountry
|
|
|
|
html5lib
|
|
|
|
six
|
|
|
|
kitchen
|
|
|
|
pypdf2
|
|
|
|
dict2xml
|
|
|
|
weasyprint
|
2021-07-24 12:14:16 +00:00
|
|
|
configargparse
|
2021-01-05 17:05:55 +00:00
|
|
|
appdirs
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
checkInputs = [
|
|
|
|
decorator
|
|
|
|
pycairo
|
|
|
|
pytestCheckHook
|
|
|
|
python-fontconfig
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
# requires Noto Serif and Roboto Mono font
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = false;
|
2021-09-26 12:46:18 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
checkPhase = ''
|
|
|
|
make tests-no-network
|
|
|
|
'';
|
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
pythonImportsCheck = [ "xml2rfc" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Tool generating IETF RFCs and drafts from XML sources";
|
2022-04-27 09:35:20 +00:00
|
|
|
homepage = "https://github.com/ietf-tools/xml2rfc";
|
2020-04-24 23:36:52 +00:00
|
|
|
# Well, parts might be considered unfree, if being strict; see:
|
|
|
|
# http://metadata.ftp-master.debian.org/changelogs/non-free/x/xml2rfc/xml2rfc_2.9.6-1_copyright
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ vcunat yrashk ];
|
|
|
|
};
|
|
|
|
}
|