1{ lib 2, appdirs 3, buildPythonPackage 4, configargparse 5, decorator 6, dict2xml 7, fetchFromGitHub 8, google-i18n-address 9, html5lib 10, intervaltree 11, jinja2 12, lxml 13, markupsafe 14, platformdirs 15, pycairo 16, pycountry 17, pyflakes 18, pypdf2 19, pytestCheckHook 20, python-fontconfig 21, pythonOlder 22, pyyaml 23, requests 24, six 25, wcwidth 26}: 27 28buildPythonPackage rec { 29 pname = "xml2rfc"; 30 version = "3.18.2"; 31 format = "setuptools"; 32 33 disabled = pythonOlder "3.7"; 34 35 src = fetchFromGitHub { 36 owner = "ietf-tools"; 37 repo = "xml2rfc"; 38 rev = "refs/tags/v${version}"; 39 hash = "sha256-IpCC5r9sOf4SFn0Bd6QgWqx3Sx0eRGcii7xyMpN5V/s="; 40 }; 41 42 postPatch = '' 43 substituteInPlace Makefile \ 44 --replace "SHELL := /bin/bash" "SHELL := bash" \ 45 --replace "test flaketest" "test" 46 substituteInPlace setup.py \ 47 --replace "'tox'," "" 48 ''; 49 50 propagatedBuildInputs = [ 51 appdirs 52 configargparse 53 dict2xml 54 google-i18n-address 55 html5lib 56 intervaltree 57 jinja2 58 lxml 59 markupsafe 60 platformdirs 61 pycountry 62 pyflakes 63 pypdf2 64 pyyaml 65 requests 66 six 67 wcwidth 68 ]; 69 70 nativeCheckInputs = [ 71 decorator 72 pycairo 73 pytestCheckHook 74 python-fontconfig 75 ]; 76 77 # Requires Noto Serif and Roboto Mono font 78 doCheck = false; 79 80 checkPhase = '' 81 make tests-no-network 82 ''; 83 84 pythonImportsCheck = [ 85 "xml2rfc" 86 ]; 87 88 meta = with lib; { 89 description = "Tool generating IETF RFCs and drafts from XML sources"; 90 homepage = "https://github.com/ietf-tools/xml2rfc"; 91 changelog = "https://github.com/ietf-tools/xml2rfc/blob/v${version}/CHANGELOG.md"; 92 # Well, parts might be considered unfree, if being strict; see: 93 # http://metadata.ftp-master.debian.org/changelogs/non-free/x/xml2rfc/xml2rfc_2.9.6-1_copyright 94 license = licenses.bsd3; 95 maintainers = with maintainers; [ vcunat yrashk ]; 96 }; 97}