summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/rust-reproducible-builds.patch
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2018-12-11 22:18:05 +0100
committerMarius Bakke <mbakke@fastmail.com>2018-12-11 22:18:05 +0100
commitb03e4fd5269897448124a7b61a737802b2c638ee (patch)
treee4eaab1d3076e335c57eea462ff7fda7919f0831 /gnu/packages/patches/rust-reproducible-builds.patch
parentda3c6a7f19ef1243af725f63c16c8fd92fde33b4 (diff)
parent99aad42138e0895df51e64e1261984f277952516 (diff)
downloadguix-patches-b03e4fd5269897448124a7b61a737802b2c638ee.tar
guix-patches-b03e4fd5269897448124a7b61a737802b2c638ee.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/patches/rust-reproducible-builds.patch')
-rw-r--r--gnu/packages/patches/rust-reproducible-builds.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/gnu/packages/patches/rust-reproducible-builds.patch b/gnu/packages/patches/rust-reproducible-builds.patch
new file mode 100644
index 0000000000..ef7bf53b5d
--- /dev/null
+++ b/gnu/packages/patches/rust-reproducible-builds.patch
@@ -0,0 +1,25 @@
+From b9ca108fcae2b738ca3f0c88c84ae5dc5a6f843f Mon Sep 17 00:00:00 2001
+From: Tim Ryan <id@timryan.org>
+Date: Mon, 14 May 2018 06:22:21 -0400
+Subject: [PATCH] Support reproducible builds by forcing window.search to use
+ stable key ordering. (#692)
+See <https://github.com/rust-lang-nursery/mdBook/pull/692>
+---
+ src/vendor/mdbook/src/renderer/html_handlebars/search.rs | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/vendor/mdbook/src/renderer/html_handlebars/search.rs b/src/vendor/mdbook/src/renderer/html_handlebars/search.rs
+index d49772f8b..1ee66a511 100644
+--- a/src/vendor/mdbook/src/renderer/html_handlebars/search.rs
++++ b/src/vendor/mdbook/src/renderer/html_handlebars/search.rs
+@@ -205,6 +205,10 @@ fn write_to_js(index: Index, search_config: &Search) -> Result<String> {
+ searchoptions,
+ index,
+ };
++
++ // By converting to serde_json::Value as an intermediary, we use a
++ // BTreeMap internally and can force a stable ordering of map keys.
++ let json_contents = serde_json::to_value(&json_contents)?;
+ let json_contents = serde_json::to_string(&json_contents)?;
+
+ Ok(format!("window.search = {};", json_contents))