aboutsummaryrefslogtreecommitdiff
path: root/development/racer
diff options
context:
space:
mode:
authorAndrew Clemons <andrew.clemons@gmail.com>2022-02-08 22:05:08 +1300
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-02-09 09:35:58 +0700
commit305a731772dd7de094ac9b453a45b24946a9a528 (patch)
tree2c54938b664eb97074e81c3e457bee70cf6b47ff /development/racer
parentf5dde89f8ea37ff8aa54dfa405bbcfb5ff781635 (diff)
development/racer: Check for rust version with rustup.
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/racer')
-rw-r--r--development/racer/racer.SlackBuild8
1 files changed, 7 insertions, 1 deletions
diff --git a/development/racer/racer.SlackBuild b/development/racer/racer.SlackBuild
index 66ec6f56d6d3f..3efa0fdb48a3a 100644
--- a/development/racer/racer.SlackBuild
+++ b/development/racer/racer.SlackBuild
@@ -146,10 +146,16 @@ find -L . \
ln -s /usr/bin/rustup rustc
)
+RUST_NIGHTLY=${RUST_NIGHTLY:-nightly-2022-01-14}
+
+if ! rustup toolchain list | grep "$RUST_NIGHTLY" > /dev/null 2>&1 ; then
+ rustup toolchain install --component rustc-dev --profile default "$RUST_NIGHTLY"
+fi
+
PATH="$(pwd)/rustup-bin:$PATH" \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
-rustup run nightly-2022-01-14 cargo build --release $CARGOTARGET
+rustup run "$RUST_NIGHTLY" cargo build --release $CARGOTARGET
mkdir -p $PKG/usr/bin/