lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

sphinx: Patch source file for normalization

One of the test files has a different encoding depending on the
filesystem's normalization. By picking a character that does not have
multiple possible encodings we make the source indifferent to
normalization. This allows the FOD hash to match across platforms with
differently normalizing filesystems.

authored by

toonn and committed by
Jonathan Ringer
22537283 ea50c977

+42 -1
+35
pkgs/development/python-modules/sphinx/0001-test-images-Use-normalization-equivalent-character.patch
··· 1 + From 181617387841b695ee77b162babf9fb177002fcb Mon Sep 17 00:00:00 2001 2 + From: toonn <toonn@toonn.io> 3 + Date: Mon, 20 Sep 2021 11:39:46 +0200 4 + Subject: [PATCH] test-images: Use normalization equivalent character 5 + MIME-Version: 1.0 6 + Content-Type: text/plain; charset=UTF-8 7 + Content-Transfer-Encoding: 8bit 8 + 9 + One of the test images used a combining character `ä` that can be 10 + encoded multiple ways. This means the file's name can end up encoded 11 + differently depending on whether/which normal form the filesystem uses. 12 + 13 + For Nix this causes a different hash for a FOD depending on the 14 + filesystem where it is evaluated. This is problematic because hashes 15 + fail to match up when evaluating the FOD across multiple platforms. 16 + --- 17 + tests/roots/test-images/index.rst | 2 +- 18 + 1 file changed, 1 insertion(+), 1 deletion(-) 19 + 20 + diff --git a/tests/roots/test-images/index.rst b/tests/roots/test-images/index.rst 21 + index 14a2987..219842e 100644 22 + --- a/tests/roots/test-images/index.rst 23 + +++ b/tests/roots/test-images/index.rst 24 + @@ -13,7 +13,7 @@ test-image 25 + 26 + The caption of img 27 + 28 + -.. image:: testimäge.png 29 + +.. image:: testimæge.png 30 + 31 + .. image:: rimg.png 32 + :target: https://www.sphinx-doc.org/ 33 + -- 34 + 2.17.2 (Apple Git-113) 35 +
+7 -1
pkgs/development/python-modules/sphinx/default.nix
··· 35 35 owner = "sphinx-doc"; 36 36 repo = pname; 37 37 rev = "v${version}"; 38 - sha256 = "1i38n5bxqiycjwmiv9dl72r3f5ks4zmif30znqg8zilclbx6g16x"; 38 + sha256 = "1bl0k326h32dag41axbsjq1d9w59rm11naj6bfirg116nqw56mk6"; 39 + extraPostFetch = '' 40 + cd $out 41 + mv tests/roots/test-images/testimäge.png \ 42 + tests/roots/test-images/testimæge.png 43 + patch -p1 < ${./0001-test-images-Use-normalization-equivalent-character.patch} 44 + ''; 39 45 }; 40 46 41 47 propagatedBuildInputs = [