2021-09-26 12:46:18 +00:00
|
|
|
{ lib
|
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, intervaltree
|
|
|
|
, pyflakes
|
|
|
|
, requests
|
|
|
|
, lxml
|
|
|
|
, google-i18n-address
|
|
|
|
, pycountry
|
|
|
|
, html5lib
|
|
|
|
, six
|
|
|
|
, kitchen
|
|
|
|
, pypdf2
|
|
|
|
, dict2xml
|
|
|
|
, weasyprint
|
|
|
|
, pyyaml
|
|
|
|
, jinja2
|
|
|
|
, configargparse
|
|
|
|
, appdirs
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "xml2rfc";
|
2021-12-19 01:06:50 +00:00
|
|
|
version = "3.12.0";
|
2021-09-26 12:46:18 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-12-19 01:06:50 +00:00
|
|
|
sha256 = "25deadb9ee95f0dc71376a60e9c1e34636b5016c1952ad5597a6246495e34464";
|
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
|
|
|
];
|
|
|
|
|
2021-09-26 12:46:18 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace "jinja2>=2.11,<3.0" "jinja2>=2.11"
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
|
|
|
# lxml tries to fetch from the internet
|
|
|
|
doCheck = false;
|
2021-09-26 12:46:18 +00:00
|
|
|
|
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";
|
|
|
|
homepage = "https://tools.ietf.org/tools/xml2rfc/trac/";
|
|
|
|
# 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 ];
|
|
|
|
};
|
|
|
|
}
|