From 138876e503cb9b9160f8ae96b950228afb246330 Mon Sep 17 00:00:00 2001 From: gentoo90 Date: Sun, 5 Jan 2020 00:05:08 +0200 Subject: dev-lang/rust-bin-9999: allow choosing specific nightly version Add RUST_NIGHTLY_DATE variable, similar to EGIT_COMMIT from git-r3.eclass. Usage: RUST_NIGHTLY_DATE="YYYY-MM-DD" emerge rust-bin:nightly Closes: https://github.com/gentoo/gentoo-rust/pull/474 Signed-off-by: Mikhail Pukhlikov --- dev-lang/rust-bin/rust-bin-9999.ebuild | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dev-lang/rust-bin/rust-bin-9999.ebuild b/dev-lang/rust-bin/rust-bin-9999.ebuild index e66acb1..3eb3dbc 100644 --- a/dev-lang/rust-bin/rust-bin-9999.ebuild +++ b/dev-lang/rust-bin/rust-bin-9999.ebuild @@ -10,6 +10,11 @@ HOMEPAGE="https://www.rust-lang.org/" MY_SRC_URI="https://static.rust-lang.org/dist/rust-nightly" MY_STDLIB_SRC_URI="https://static.rust-lang.org/dist/rust-std-nightly" +if [[ -v RUST_NIGHTLY_DATE ]]; then + MY_SRC_URI="https://static.rust-lang.org/dist/${RUST_NIGHTLY_DATE}/rust-nightly" + MY_STDLIB_SRC_URI="https://static.rust-lang.org/dist/${RUST_NIGHTLY_DATE}/rust-std-nightly" +fi + ALL_RUSTLIB_TARGETS=( "wasm32-unknown-unknown" ) @@ -80,6 +85,9 @@ src_install() { components="${components},rls-preview,${analysis}" fi use rustfmt && components="${components},rustfmt-preview" + + elog "installing components: ${components}" + ./install.sh \ --components="${components}" \ --disable-verify \ -- cgit v1.2.3-65-gdbad