Skip to content

Commit

Permalink
python.pkgs.sphinxcontrib-openapi: switch to cilium fork
Browse files Browse the repository at this point in the history
This fork uses m2r instead of mdinclude.

m2r is unmaintained and incompatible with recent versions of mistune.

See

 - cilium/cilium@b986246
 - cilium/openapi@cd829a0

for details.
  • Loading branch information
flokli committed Aug 27, 2022
1 parent ee51f56 commit 4c9c4cf
Showing 1 changed file with 28 additions and 9 deletions.
37 changes: 28 additions & 9 deletions pkgs/development/python-modules/sphinxcontrib-openapi/default.nix
Original file line number Diff line number Diff line change
@@ -1,26 +1,46 @@
{ lib
, buildPythonPackage
, fetchPypi
, deepmerge
, fetchFromGitHub
, fetchpatch
, 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-26";
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 = "0ea3332fa6482114f1a8248a32a1eacb61aebb69";
hash = "sha256-a/oVMg9gGTD+NClfpC2SpjbY/mIcZEVLLOR0muAg5zY=";
};

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;

Expand All @@ -29,5 +49,4 @@ buildPythonPackage rec {
description = "OpenAPI (fka Swagger) spec renderer for Sphinx";
license = licenses.bsd0;
};

}

0 comments on commit 4c9c4cf

Please sign in to comment.