From 475bd574cfeba021b9c93d6b6e4453a259430557 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Thu, 25 Aug 2022 12:57:40 +0200 Subject: [PATCH] python.pkgs.sphinxcontrib-openapi: switch to cilium fork This fork uses m2r instead of mdinclude. m2r is unmaintained and incompatible with recent versions of mistune. See - https://github.com/cilium/cilium/commit/b9862461568dd41d4dc8924711d4cc363907270b - https://github.com/cilium/openapi/commit/cd829a05caebd90b31e325d4c9c2714b459d135f for details. --- .../sphinxcontrib-openapi/default.nix | 35 ++++++++++++++----- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/sphinxcontrib-openapi/default.nix b/pkgs/development/python-modules/sphinxcontrib-openapi/default.nix index c85d967222e361..4a04886180b554 100644 --- a/pkgs/development/python-modules/sphinxcontrib-openapi/default.nix +++ b/pkgs/development/python-modules/sphinxcontrib-openapi/default.nix @@ -1,26 +1,45 @@ { lib , buildPythonPackage -, fetchPypi +, deepmerge +, fetchFromGitHub , isPy27 , setuptools-scm -, m2r -, pyyaml , jsonschema +, picobox +, pyyaml +, sphinx_mdinclude , sphinxcontrib_httpdomain }: buildPythonPackage rec { pname = "sphinxcontrib-openapi"; - version = "0.7.0"; + version = "unstable-2022-08-11"; disabled = isPy27; - src = fetchPypi { - inherit pname version; - sha256 = "1c1bd10d7653912c59a42f727c62cbb7b75f7905ddd9ccc477ebfd1bc69f0cf3"; + # Switch to Cilums' fork of openapi, which uses m2r instead of mdinclude, + # as m2r is unmaintained and incompatible with the version of mistune. + # See + # https://github.com/cilium/cilium/commit/b9862461568dd41d4dc8924711d4cc363907270b and + # https://github.com/cilium/openapi/commit/cd829a05caebd90b31e325d4c9c2714b459d135f + # for details. + src = fetchFromGitHub { + owner = "cilium"; + repo = "openapi"; + rev = "a1d4fca2e7c3ae3cca69593baade1ebc297a12ff"; + sha256 = "sha256-4xW4Qgr7IR055B74M/zn9cdnTmC4Pg7QZB3mH4YjDk4="; }; nativeBuildInputs = [ setuptools-scm ]; - propagatedBuildInputs = [ pyyaml jsonschema m2r sphinxcontrib_httpdomain ]; + propagatedBuildInputs = [ + deepmerge + jsonschema + picobox + pyyaml + sphinx_mdinclude + sphinxcontrib_httpdomain + ]; + + SETUPTOOLS_SCM_PRETEND_VERSION = version; doCheck = false;