4747 openssl.org : ' *' # needed to build openssl-sys
4848 freedesktop.org/pkg-config : ^0.29
4949 crates.io/semverator : 0
50+ rust-lang.org/rustup : ' *'
5051 script : |-
5152 # --enable-optimize not available as of 1.63.0
5253 if semverator satisfies '<1.63' {{ version }}; then
@@ -67,14 +68,20 @@ build:
6768 ./x.py install $tool
6869 done
6970
70- # place source for IDEs to use (normally installed via rustup)
71- # FIXME: this is fragile because directories can change, is there a better way?
72- mkdir -p {{prefix}}/lib/rustlib/src/rust
73- mv Cargo.lock {{prefix}}/lib/rustlib/src/rust
74- mv library {{prefix}}/lib/rustlib/src/rust
75- mkdir -p {{prefix}}/lib/rustlib/src/rust/src/llvm-project
76- mv src/llvm-project/libunwind {{prefix}}/lib/rustlib/src/rust/src/llvm-project
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
7778
79+ # install src via rustup and copy component for IDEs to use
80+ rustup default {{ version }}
81+ rustup component add rust-src
82+ rp -r ~/.rustup/toolchains/*/lib/rustlib/src {{prefix}}/lib/rustlib
83+
84+ # do cleanup
7885 rm -rf {{prefix}}/share/doc
7986 env :
8087 ARGS :
0 commit comments