b5f92a349c
GitOrigin-RevId: 7c9cc5a6e5d38010801741ac830a3f8fd667a7a0
97 lines
1.8 KiB
Nix
97 lines
1.8 KiB
Nix
{ lib
|
|
, appdirs
|
|
, buildPythonPackage
|
|
, configargparse
|
|
, decorator
|
|
, dict2xml
|
|
, fetchFromGitHub
|
|
, google-i18n-address
|
|
, html5lib
|
|
, intervaltree
|
|
, jinja2
|
|
, lxml
|
|
, markupsafe
|
|
, platformdirs
|
|
, pycairo
|
|
, pycountry
|
|
, pyflakes
|
|
, pypdf2
|
|
, pytestCheckHook
|
|
, python-fontconfig
|
|
, pythonOlder
|
|
, pyyaml
|
|
, requests
|
|
, six
|
|
, wcwidth
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "xml2rfc";
|
|
version = "3.18.2";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ietf-tools";
|
|
repo = "xml2rfc";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-IpCC5r9sOf4SFn0Bd6QgWqx3Sx0eRGcii7xyMpN5V/s=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace Makefile \
|
|
--replace "SHELL := /bin/bash" "SHELL := bash" \
|
|
--replace "test flaketest" "test"
|
|
substituteInPlace setup.py \
|
|
--replace "'tox'," ""
|
|
'';
|
|
|
|
propagatedBuildInputs = [
|
|
appdirs
|
|
configargparse
|
|
dict2xml
|
|
google-i18n-address
|
|
html5lib
|
|
intervaltree
|
|
jinja2
|
|
lxml
|
|
markupsafe
|
|
platformdirs
|
|
pycountry
|
|
pyflakes
|
|
pypdf2
|
|
pyyaml
|
|
requests
|
|
six
|
|
wcwidth
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
decorator
|
|
pycairo
|
|
pytestCheckHook
|
|
python-fontconfig
|
|
];
|
|
|
|
# Requires Noto Serif and Roboto Mono font
|
|
doCheck = false;
|
|
|
|
checkPhase = ''
|
|
make tests-no-network
|
|
'';
|
|
|
|
pythonImportsCheck = [
|
|
"xml2rfc"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Tool generating IETF RFCs and drafts from XML sources";
|
|
homepage = "https://github.com/ietf-tools/xml2rfc";
|
|
changelog = "https://github.com/ietf-tools/xml2rfc/blob/v${version}/CHANGELOG.md";
|
|
# 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 ];
|
|
};
|
|
}
|