docsets.rust-std: patch so that std:: docs show up properly in std::, not rust_std::std

This commit is contained in:
2024-11-04 02:52:41 +00:00
parent 3179eb03eb
commit 616881c09b
4 changed files with 10 additions and 4 deletions

View File

@@ -3,5 +3,5 @@
version = 3 version = 3
[[package]] [[package]]
name = "rust-std" name = "std"
version = "0.1.0" version = "0.1.0"

View File

@@ -1,5 +1,5 @@
[package] [package]
name = "rust-std" name = "std"
version = "0.1.0" version = "0.1.0"
edition = "2021" edition = "2021"

View File

@@ -3,9 +3,15 @@
rustPlatform, rustPlatform,
}: }:
rustPlatform.buildRustPackage { rustPlatform.buildRustPackage {
name = "rust-std"; pname = "std";
inherit (rustPlatform.rust.rustc) version;
src = ./.; src = ./.;
cargoLock.lockFile = ./Cargo.lock; cargoLock.lockFile = ./Cargo.lock;
postPatch = ''
substituteInPlace Cargo.toml \
--replace-fail 'version = "0.1.0"' 'version = "'"$version"'"'
'';
nativeBuildInputs = [ docsets.cargoDocsetHook ]; nativeBuildInputs = [ docsets.cargoDocsetHook ];
} }

View File

@@ -6,4 +6,4 @@
// *sigh* // *sigh*
#[doc(inline)] #[doc(inline)]
pub use std; pub use std::*;