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