diff --git a/projects/rust-lang.org/package.yml b/projects/rust-lang.org/package.yml index 32adfb1bfa..71014636a2 100644 --- a/projects/rust-lang.org/package.yml +++ b/projects/rust-lang.org/package.yml @@ -31,50 +31,26 @@ options: dependencies: tea.xyz/gx/cc: c99 - #FIXME ^^ strictly rustc only needs a linker - zlib.net: 1 + +runtime: + env: + RUST_SRC_PATH: ${{prefix}}/lib/rustlib/src/rust/src build: dependencies: - tea.xyz/gx/make: '*' #FIXME surely we don’t need make AND ninja - cmake.org: ^3.20 - ninja-build.org: ^1.10 - python.org: 3 - openssl.org: '*' # needed to build openssl-sys - freedesktop.org/pkg-config: ^0.29 - crates.io/semverator: 0 + rust-lang.org/rustup: '*' script: |- - # --enable-optimize not available as of 1.63.0 - if semverator satisfies '<1.63' {{ version }}; then - export ARGS="$ARGS --enable-optimize" - fi - - # 1.68.0 introduced a regression w.r.t. CI builds - # https://github.com/rust-lang/rust/issues/108959 - if semverator satisfies '>=1.68<1.70' {{ version }}; then - sed -i.bak -e 's/CiEnv::is_ci()/CiEnv::is_ci() \&\& config.rust_info.is_managed_git_subrepository()/' src/bootstrap/native.rs - rm src/bootstrap/native.rs.bak - fi - - ./configure $ARGS - make install - - for tool in $tools; do - ./x.py install $tool - done - + rustup default {{ version }} + rustup component add rust-analyzer + # used for type checking in IDEs + rustup component add rust-src + + # copy installation + mkdir -p {{ prefix }} + cp -r ~/.rustup/toolchains/*/* {{prefix}} + + # do cleanup rm -rf {{prefix}}/share/doc - env: - ARGS: - - --enable-vendor - - --prefix={{ prefix }} - - --enable-ninja - - --disable-docs # docs are online - - --tools=clippy,rustfmt,analysis - tools: - - clippy - - rustfmt - - rust-analyzer test: script: |