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