summary refs log tree commit diff
diff options
context:
space:
mode:
authorNaïm Favier <n@monade.li>2023-01-12 11:05:22 +0100
committerMartin Weinelt <hexa@darmstadt.ccc.de>2023-03-03 23:56:30 +0100
commit07ff0b59009c59e65695c0cdc4d0197910534391 (patch)
tree91f9969dc0549bf4ccfd905ae063d5c193ee778e
parent664f1330fbf81f4e1bdcad539a99ce45b07f6bdb (diff)
downloadnixpkgs-07ff0b59009c59e65695c0cdc4d0197910534391.tar
nixpkgs-07ff0b59009c59e65695c0cdc4d0197910534391.tar.gz
nixpkgs-07ff0b59009c59e65695c0cdc4d0197910534391.tar.bz2
nixpkgs-07ff0b59009c59e65695c0cdc4d0197910534391.tar.lz
nixpkgs-07ff0b59009c59e65695c0cdc4d0197910534391.tar.xz
nixpkgs-07ff0b59009c59e65695c0cdc4d0197910534391.tar.zst
nixpkgs-07ff0b59009c59e65695c0cdc4d0197910534391.zip
sphinx: 5.3.0 -> 6.1.3
https://www.sphinx-doc.org/en/master/changes.html#release-6-1-3-released-jan-10-2023
-rw-r--r--pkgs/development/python-modules/sphinx/0001-test-images-Use-normalization-equivalent-character.patch35
-rw-r--r--pkgs/development/python-modules/sphinx/default.nix25
2 files changed, 14 insertions, 46 deletions
diff --git a/pkgs/development/python-modules/sphinx/0001-test-images-Use-normalization-equivalent-character.patch b/pkgs/development/python-modules/sphinx/0001-test-images-Use-normalization-equivalent-character.patch
deleted file mode 100644
index 805e724d0c8..00000000000
--- a/pkgs/development/python-modules/sphinx/0001-test-images-Use-normalization-equivalent-character.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 181617387841b695ee77b162babf9fb177002fcb Mon Sep 17 00:00:00 2001
-From: toonn <toonn@toonn.io>
-Date: Mon, 20 Sep 2021 11:39:46 +0200
-Subject: [PATCH] test-images: Use normalization equivalent character
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-One of the test images used a combining character `ä` that can be
-encoded multiple ways. This means the file's name can end up encoded
-differently depending on whether/which normal form the filesystem uses.
-
-For Nix this causes a different hash for a FOD depending on the
-filesystem where it is evaluated. This is problematic because hashes
-fail to match up when evaluating the FOD across multiple platforms.
----
- tests/roots/test-images/index.rst | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tests/roots/test-images/index.rst b/tests/roots/test-images/index.rst
-index 14a2987..219842e 100644
---- a/tests/roots/test-images/index.rst
-+++ b/tests/roots/test-images/index.rst
-@@ -13,7 +13,7 @@ test-image
- 
-    The caption of img
- 
--.. image:: testimäge.png
-+.. image:: testimæge.png
- 
- .. image:: rimg.png
-    :target: https://www.sphinx-doc.org/
--- 
-2.17.2 (Apple Git-113)
-
diff --git a/pkgs/development/python-modules/sphinx/default.nix b/pkgs/development/python-modules/sphinx/default.nix
index 3e50d87ec87..f62c7a18b6a 100644
--- a/pkgs/development/python-modules/sphinx/default.nix
+++ b/pkgs/development/python-modules/sphinx/default.nix
@@ -3,7 +3,6 @@
 , buildPythonPackage
 , pythonOlder
 , fetchFromGitHub
-, fetchpatch
 
 # nativeBuildInputs
 , flit-core
@@ -32,27 +31,33 @@
 , cython
 , html5lib
 , pytestCheckHook
-, typed-ast
 }:
 
 buildPythonPackage rec {
   pname = "sphinx";
-  version = "5.3.0";
+  version = "6.1.3";
   format = "pyproject";
 
-  disabled = pythonOlder "3.6";
+  disabled = pythonOlder "3.8";
 
   src = fetchFromGitHub {
     owner = "sphinx-doc";
     repo = pname;
     rev = "refs/tags/v${version}";
-    hash = "sha256-80bVg1rfBebgSOKbWkzP84vpm39iLgM8lWlVD64nSsQ=";
+    /* One of the test images used a combining character `ä` that can be
+       encoded multiple ways. This means the file's name can end up encoded
+       differently depending on whether/which normal form the filesystem uses.
+
+       For Nix this causes a different hash for a FOD depending on the
+       filesystem where it is evaluated. This is problematic because hashes
+       fail to match up when evaluating the FOD across multiple platforms.
+    */
     postFetch = ''
       cd $out
-      mv tests/roots/test-images/testimäge.png \
-        tests/roots/test-images/testimæge.png
-      patch -p1 < ${./0001-test-images-Use-normalization-equivalent-character.patch}
+      mv tests/roots/test-images/{testimäge,testimæge}.png
+      sed -i 's/testimäge/testimæge/g' tests/{test_build*.py,roots/test-images/index.rst}
     '';
+    hash = "sha256-ClKAB+oQ0sdV/mssfXEkgpqbzhT3ybXPeqjQjbxqbrY=";
   };
 
   nativeBuildInputs = [
@@ -88,12 +93,10 @@ buildPythonPackage rec {
     cython
     html5lib
     pytestCheckHook
-  ] ++ lib.optionals (pythonOlder "3.8") [
-    typed-ast
   ];
 
   preCheck = ''
-    export HOME=$(mktemp -d)
+    export HOME=$TMPDIR
   '';
 
   disabledTests = [