mirror of
https://github.com/ivabus/pantry
synced 2024-11-14 04:25:08 +03:00
77 lines
1.5 KiB
YAML
77 lines
1.5 KiB
YAML
distributable:
|
||
url: https://static.rust-lang.org/dist/rustc-{{ version }}-src.tar.gz
|
||
strip-components: 1
|
||
|
||
versions:
|
||
github: rust-lang/rust
|
||
strip: /^Rust /
|
||
|
||
companions:
|
||
rust-lang.org/cargo: '*'
|
||
|
||
provides:
|
||
- bin/cargo-clippy
|
||
- bin/cargo-fmt
|
||
- bin/clippy-driver
|
||
- bin/rust-analyzer
|
||
- bin/rust-gdb
|
||
- bin/rust-gdbgui
|
||
- bin/rust-lldb
|
||
- bin/rustc
|
||
- bin/rustdoc
|
||
- bin/rustfmt
|
||
|
||
#TODO: unimplemented idea for the “options” feature
|
||
options:
|
||
- clippy
|
||
- rustfmt
|
||
- analysis
|
||
- { name: rust-demangler, default: false }
|
||
|
||
dependencies:
|
||
tea.xyz/gx/cc: c99
|
||
#FIXME ^^ strictly rustc only needs a linker
|
||
zlib.net: 1
|
||
|
||
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
|
||
script: |-
|
||
# --enable-optimize not available as of 1.63.0
|
||
if test {{version.major}} -eq 1 -a {{version.minor}} -lt 63; then
|
||
export ARGS="$ARGS --enable-optimize"
|
||
fi
|
||
|
||
./configure $ARGS
|
||
make install
|
||
|
||
for tool in $tools; do
|
||
./x.py install $tool
|
||
done
|
||
|
||
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: |
|
||
rustc $FIXTURE -o hello
|
||
./hello
|
||
fixture: |
|
||
fn main() {
|
||
println!("Hello World!");
|
||
}
|