1{ lib 2, buildPythonPackage 3, deepmerge 4, fetchFromGitHub 5, fetchpatch 6, isPy27 7, setuptools-scm 8, jsonschema 9, picobox 10, pyyaml 11, sphinx-mdinclude 12, sphinxcontrib_httpdomain 13}: 14 15buildPythonPackage rec { 16 pname = "sphinxcontrib-openapi"; 17 version = "unstable-2022-08-26"; 18 disabled = isPy27; 19 20 # Switch to Cilums' fork of openapi, which uses m2r instead of mdinclude, 21 # as m2r is unmaintained and incompatible with the version of mistune. 22 # See 23 # https://github.com/cilium/cilium/commit/b9862461568dd41d4dc8924711d4cc363907270b and 24 # https://github.com/cilium/openapi/commit/cd829a05caebd90b31e325d4c9c2714b459d135f 25 # for details. 26 # PR to switch upstream sphinx-contrib/openapi from m2r to sphinx-mdinclude: 27 # https://github.com/sphinx-contrib/openapi/pull/127 28 # (once merged, we should switch away from that fork again) 29 src = fetchFromGitHub { 30 owner = "cilium"; 31 repo = "openapi"; 32 rev = "0ea3332fa6482114f1a8248a32a1eacb61aebb69"; 33 hash = "sha256-a/oVMg9gGTD+NClfpC2SpjbY/mIcZEVLLOR0muAg5zY="; 34 }; 35 36 nativeBuildInputs = [ setuptools-scm ]; 37 propagatedBuildInputs = [ 38 deepmerge 39 jsonschema 40 picobox 41 pyyaml 42 sphinx-mdinclude 43 sphinxcontrib_httpdomain 44 ]; 45 46 SETUPTOOLS_SCM_PRETEND_VERSION = version; 47 48 doCheck = false; 49 50 meta = with lib; { 51 homepage = "https://github.com/ikalnytskyi/sphinxcontrib-openapi"; 52 description = "OpenAPI (fka Swagger) spec renderer for Sphinx"; 53 license = licenses.bsd0; 54 maintainers = [ maintainers.flokli ]; 55 }; 56}