From 2686e382e06b1e4ba43632aa62b930fe9b5a4991 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 24 Apr 2022 02:26:55 +0200 Subject: [PATCH] python310Packages.xml2rfc: 3.12.3 -> 3.12.4 --- .../python-modules/xml2rfc/default.nix | 50 +++++++++++++------ 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/xml2rfc/default.nix b/pkgs/development/python-modules/xml2rfc/default.nix index c9cf286b6cce..be9323c774d8 100644 --- a/pkgs/development/python-modules/xml2rfc/default.nix +++ b/pkgs/development/python-modules/xml2rfc/default.nix @@ -1,6 +1,6 @@ { lib -, fetchPypi , buildPythonPackage +, fetchFromGitHub , pythonOlder , intervaltree , pyflakes @@ -18,19 +18,37 @@ , jinja2 , configargparse , appdirs +, decorator +, pycairo +, pytestCheckHook +, python-fontconfig }: buildPythonPackage rec { pname = "xml2rfc"; - version = "3.12.3"; + version = "3.12.4"; disabled = pythonOlder "3.6"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-YUrcD3Q1fkDW+nwf6k2T/aBL8+W9iWkPYW/TqdTiuA0="; + src = fetchFromGitHub { + owner = "ietf-tools"; + repo = "xml2rfc"; + rev = "v${version}"; + sha256 = "sha256-TAu2Ls553t7wJ/Jhgu+Ff+H4P6az0Du8OL00JjZyCDs="; }; + postPatch = '' + substituteInPlace Makefile \ + --replace "SHELL := /bin/bash" "SHELL := bash" \ + --replace "test flaketest" "test" \ + --replace "python setup.py --quiet install" "" + substituteInPlace setup.py \ + --replace "'tox'," "" + substituteInPlace requirements.txt \ + --replace "jinja2>=2.11,<3.0" "jinja2" \ + --replace "markupsafe==2.0.1" "markupsafe" + ''; + propagatedBuildInputs = [ intervaltree jinja2 @@ -50,23 +68,25 @@ buildPythonPackage rec { appdirs ]; - postPatch = '' - substituteInPlace requirements.txt \ - --replace "jinja2>=2.11,<3.0" "jinja2>=2.11" - ''; + checkInputs = [ + decorator + pycairo + pytestCheckHook + python-fontconfig + ]; - preCheck = '' - export HOME=$(mktemp -d) - ''; - - # lxml tries to fetch from the internet + # 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://tools.ietf.org/tools/xml2rfc/trac/"; + homepage = "https://github.com/ietf-tools/xml2rfc"; # 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;