pantry/projects/rust-lang.org/package.yml

69 lines
1.7 KiB
YAML
Raw Normal View History

2022-08-04 00:39:16 +03:00
distributable:
url: https://static.rust-lang.org/dist/rustc-{{ version }}-src.tar.gz
strip-components: 1
versions:
github: rust-lang/rust
strip: /^Rust /
# TODO cargo should be a separate package (probs)
# NOTE that it does have independent versioning
# TODO we should disable rust-up etc. if you want that, install rust with rust-up!
provides:
- bin/cargo
- bin/rustc
- bin/rustdoc
- bin/rust-lldb
- bin/rust-gdb
- bin/rust-gdbgui
options:
- cargo # the rust package manager
- rls
- clippy
- rustfmt
- analysis
- { name: rust-demangler, default: false }
dependencies:
#FIXME strictly rustc only needs a linker
tea.xyz/gx/cc: c99
zlib.net: 1
2022-08-04 00:39:16 +03:00
#TODO cargo needs git
# this is a usage dependency, it's not required for cargo to run, just for some usages of cargo to run
# so would be a little more strict than “recommended“
#git-scm.com: 2
build:
dependencies:
tea.xyz/gx/make: '*' #FIXME surely we dont need make AND ninja
cmake.org: ^3.20
ninja-build.org: ^1.10
curl.se: '*'
python.org: 3
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
2022-08-04 00:39:16 +03:00
./configure $ARGS
make install
mv ./build/{{ hw.target }}/stage0/bin/cargo {{ prefix }}/bin/cargo
2022-08-27 18:58:16 +03:00
rm -rf {{prefix}}/share/doc
2022-08-04 00:39:16 +03:00
#TODO ^^ build cargo properly
env:
ARGS:
- --enable-vendor
- --prefix={{ prefix }}
- --enable-ninja
2022-08-27 18:58:16 +03:00
- --disable-docs # docs are online
2022-08-04 00:39:16 +03:00
test:
script: |
rustc $FIXTURE -o hello
./hello
fixture: |
fn main() {
println!("Hello World!");
}