commit:     138876e503cb9b9160f8ae96b950228afb246330
Author:     gentoo90 <gentoo90 <AT> gmail <DOT> com>
AuthorDate: Sat Jan  4 22:05:08 2020 +0000
Commit:     Mikhail Pukhlikov <cynede <AT> gentoo <DOT> org>
CommitDate: Mon Jan 13 06:19:22 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/rust.git/commit/?id=138876e5

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 <cynede <AT> gentoo.org>

 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 \

Reply via email to