mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: rust: Shorten patch file name.
This file name was too long to fit in a tar archive. * gnu/packages/patches/rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch: Rename to... * gnu/packages/patches/rust-reproducible-builds.patch: ... this. * gnu/packages/rust.scm (rust-1.27, rust): Adjust accordingly. * gnu/local.mk (dist_patch_DATA): Adjust accordingly.
This commit is contained in:
parent
994b5b1d01
commit
f2c99fe52b
3 changed files with 3 additions and 3 deletions
25
gnu/packages/patches/rust-reproducible-builds.patch
Normal file
25
gnu/packages/patches/rust-reproducible-builds.patch
Normal file
|
@ -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))
|
Loading…
Add table
Add a link
Reference in a new issue