2021-09-26 12:46:18 +00:00
|
|
|
{ lib
|
2023-02-02 18:25:31 +00:00
|
|
|
, appdirs
|
2021-09-26 12:46:18 +00:00
|
|
|
, buildPythonPackage
|
2023-02-02 18:25:31 +00:00
|
|
|
, configargparse
|
|
|
|
, decorator
|
|
|
|
, dict2xml
|
2022-04-27 09:35:20 +00:00
|
|
|
, fetchFromGitHub
|
2021-09-26 12:46:18 +00:00
|
|
|
, google-i18n-address
|
|
|
|
, html5lib
|
2023-02-02 18:25:31 +00:00
|
|
|
, intervaltree
|
2021-09-26 12:46:18 +00:00
|
|
|
, jinja2
|
2023-02-02 18:25:31 +00:00
|
|
|
, lxml
|
|
|
|
, markupsafe
|
2022-04-27 09:35:20 +00:00
|
|
|
, pycairo
|
2023-02-02 18:25:31 +00:00
|
|
|
, pycountry
|
|
|
|
, pyflakes
|
|
|
|
, pypdf2
|
2022-04-27 09:35:20 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, python-fontconfig
|
2023-02-02 18:25:31 +00:00
|
|
|
, pythonOlder
|
|
|
|
, pyyaml
|
|
|
|
, requests
|
|
|
|
, six
|
|
|
|
, wcwidth
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "xml2rfc";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "3.16.0";
|
|
|
|
format = "setuptools";
|
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}";
|
2023-02-02 18:25:31 +00:00
|
|
|
hash = "sha256-H2m6WZTIu2xLIz3ysOZcicIibPj8mErrxYM2+F07aS0=";
|
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" \
|
2022-09-30 11:47:45 +00:00
|
|
|
--replace "test flaketest" "test"
|
2022-04-27 09:35:20 +00:00
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "'tox'," ""
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2023-02-02 18:25:31 +00:00
|
|
|
appdirs
|
|
|
|
configargparse
|
|
|
|
dict2xml
|
|
|
|
google-i18n-address
|
|
|
|
html5lib
|
2020-04-24 23:36:52 +00:00
|
|
|
intervaltree
|
2020-09-25 04:45:31 +00:00
|
|
|
jinja2
|
2023-02-02 18:25:31 +00:00
|
|
|
lxml
|
|
|
|
markupsafe
|
|
|
|
pycountry
|
2020-04-24 23:36:52 +00:00
|
|
|
pyflakes
|
2023-02-02 18:25:31 +00:00
|
|
|
pypdf2
|
2020-09-25 04:45:31 +00:00
|
|
|
pyyaml
|
2020-04-24 23:36:52 +00:00
|
|
|
requests
|
|
|
|
six
|
2023-02-02 18:25:31 +00:00
|
|
|
wcwidth
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-04-27 09:35:20 +00:00
|
|
|
decorator
|
|
|
|
pycairo
|
|
|
|
pytestCheckHook
|
|
|
|
python-fontconfig
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +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
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +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";
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/ietf-tools/xml2rfc/blob/v${version}/CHANGELOG.md";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|