summary refs log tree commit diff
diff options
context:
space:
mode:
authorBernardo Meurer <bernardo@meurer.org>2022-10-07 16:48:56 -0300
committerGitHub <noreply@github.com>2022-10-07 16:48:56 -0300
commitd8248ab1f769ac186592f5bd8859b3e993e80fc9 (patch)
tree345864584bf91ebfc84e6b08cb484890a7cdb9be
parent5862dabeedff399d925d1844a389376dcd60ce57 (diff)
parent6fb37700bd0694ccfb9cbed150bd6695d3dc1013 (diff)
Merge pull request #194973 from lovesegfault/sphinx-automodapi
-rw-r--r--pkgs/development/python-modules/sphinx-automodapi/default.nix20
1 files changed, 16 insertions, 4 deletions
diff --git a/pkgs/development/python-modules/sphinx-automodapi/default.nix b/pkgs/development/python-modules/sphinx-automodapi/default.nix
index 9786876fb66b3..c8b586d0fc6e5 100644
--- a/pkgs/development/python-modules/sphinx-automodapi/default.nix
+++ b/pkgs/development/python-modules/sphinx-automodapi/default.nix
@@ -1,11 +1,13 @@
 { lib
 , buildPythonPackage
+, cython
 , fetchFromGitHub
+, fetchurl
+, gcc
+, graphviz
 , pytestCheckHook
 , pythonOlder
 , sphinx
-, gcc
-, cython
 }:
 
 buildPythonPackage rec {
@@ -25,12 +27,22 @@ buildPythonPackage rec {
   propagatedBuildInputs = [ sphinx ];
 
   # https://github.com/astropy/sphinx-automodapi/issues/155
-  doCheck = false;
+  testInventory = fetchurl {
+    # Originally: https://docs.python.org/3/objects.inv
+    url = "https://web.archive.org/web/20221007193144/https://docs.python.org/3/objects.inv";
+    hash = "sha256-1cbUmdJJSoifkiIYa70SxnLsaK3F2gvnTEWo9vo/6rY=";
+  };
+
+  postPatch = ''
+    substituteInPlace "sphinx_automodapi/tests/helpers.py" \
+      --replace '[0]), None)' "[0]), (None, '${testInventory}'))"
+  '';
 
   checkInputs = [
     pytestCheckHook
-    gcc
     cython
+    gcc
+    graphviz
   ];
 
   pythonImportsCheck = [ "sphinx_automodapi" ];