Skip to content

Commit 5a3c7d5

Browse files
committed
Do complete installation using rustup
1 parent 3415ba3 commit 5a3c7d5

File tree

1 file changed

+6
-49
lines changed

1 file changed

+6
-49
lines changed

projects/rust-lang.org/package.yml

Lines changed: 6 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -31,69 +31,26 @@ options:
3131

3232
dependencies:
3333
tea.xyz/gx/cc: c99
34-
#FIXME ^^ strictly rustc only needs a linker
35-
zlib.net: 1
3634

3735
runtime:
3836
env:
3937
RUST_SRC_PATH: ${{prefix}}/lib/rustlib/src/rust/src
4038

4139
build:
4240
dependencies:
43-
tea.xyz/gx/make: '*' #FIXME surely we don’t need make AND ninja
44-
cmake.org: ^3.20
45-
ninja-build.org: ^1.10
46-
python.org: 3
47-
openssl.org: '*' # needed to build openssl-sys
48-
freedesktop.org/pkg-config: ^0.29
49-
crates.io/semverator: 0
5041
rust-lang.org/rustup: '*'
5142
script: |-
52-
# --enable-optimize not available as of 1.63.0
53-
if semverator satisfies '<1.63' {{ version }}; then
54-
export ARGS="$ARGS --enable-optimize"
55-
fi
56-
57-
# 1.68.0 introduced a regression w.r.t. CI builds
58-
# https://github.com/rust-lang/rust/issues/108959
59-
if semverator satisfies '>=1.68<1.70' {{ version }}; then
60-
sed -i.bak -e 's/CiEnv::is_ci()/CiEnv::is_ci() \&\& config.rust_info.is_managed_git_subrepository()/' src/bootstrap/native.rs
61-
rm src/bootstrap/native.rs.bak
62-
fi
63-
64-
./configure $ARGS
65-
make install
66-
67-
for tool in $tools; do
68-
./x.py install $tool
69-
done
70-
71-
# # place source for IDEs to use (normally installed via rustup)
72-
# # FIXME: this is fragile because directories can change, is there a better way?
73-
# mkdir -p {{prefix}}/lib/rustlib/src/rust
74-
# mv Cargo.lock {{prefix}}/lib/rustlib/src/rust
75-
# mv library {{prefix}}/lib/rustlib/src/rust
76-
# mkdir -p {{prefix}}/lib/rustlib/src/rust/src/llvm-project
77-
# mv src/llvm-project/libunwind {{prefix}}/lib/rustlib/src/rust/src/llvm-project
78-
79-
# install src via rustup and copy component for IDEs to use
8043
rustup default {{ version }}
44+
rustup component add rust-analyzer
45+
# used for type checking in IDEs
8146
rustup component add rust-src
82-
rp -r ~/.rustup/toolchains/*/lib/rustlib/src {{prefix}}/lib/rustlib
47+
48+
# copy installation
49+
mkdir -p {{ prefix }}
50+
cp -r ~/.rustup/toolchains/*/* {{prefix}}
8351
8452
# do cleanup
8553
rm -rf {{prefix}}/share/doc
86-
env:
87-
ARGS:
88-
- --enable-vendor
89-
- --prefix={{ prefix }}
90-
- --enable-ninja
91-
- --disable-docs # docs are online
92-
- --tools=clippy,rustfmt,analysis
93-
tools:
94-
- clippy
95-
- rustfmt
96-
- rust-analyzer
9754
9855
test:
9956
script: |

0 commit comments

Comments
 (0)