Skip to content

Commit 7ab9045

Browse files
committed
Do complete installation using rustup
1 parent 3415ba3 commit 7ab9045

File tree

1 file changed

+2
-52
lines changed

1 file changed

+2
-52
lines changed

projects/rust-lang.org/package.yml

Lines changed: 2 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -29,71 +29,21 @@ options:
2929
- analysis
3030
- { name: rust-demangler, default: false }
3131

32-
dependencies:
33-
tea.xyz/gx/cc: c99
34-
#FIXME ^^ strictly rustc only needs a linker
35-
zlib.net: 1
36-
3732
runtime:
3833
env:
3934
RUST_SRC_PATH: ${{prefix}}/lib/rustlib/src/rust/src
4035

4136
build:
4237
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
5038
rust-lang.org/rustup: '*'
5139
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
8040
rustup default {{ version }}
41+
# used for type checking in IDEs
8142
rustup component add rust-src
82-
rp -r ~/.rustup/toolchains/*/lib/rustlib/src {{prefix}}/lib/rustlib
43+
cp -r ~/.rustup/toolchains/*/* {{prefix}}
8344
8445
# do cleanup
8546
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
9747
9848
test:
9949
script: |

0 commit comments

Comments
 (0)