mirror of
https://github.com/ivabus/pantry
synced 2024-11-10 02:25:18 +03:00
67 lines
1.7 KiB
YAML
67 lines
1.7 KiB
YAML
distributable:
|
|
url: https://github.com/rust-lang/cargo/archive/refs/tags/{{version}}.tar.gz
|
|
strip-components: 1
|
|
|
|
versions:
|
|
github: rust-lang/cargo/tags
|
|
|
|
provides:
|
|
- bin/cargo
|
|
|
|
runtime:
|
|
env:
|
|
CARGO_INSTALL_ROOT: ${{home}}/.local
|
|
|
|
companions:
|
|
git-scm.org: ^2
|
|
rust-lang.org: '*'
|
|
|
|
dependencies:
|
|
zlib.net: ^1
|
|
libgit2.org: ~1.7 # links to libgit2.so.1.7
|
|
curl.se/ca-certs: '*'
|
|
linux:
|
|
llvm.org: '*' # FIXME only need the linker actually
|
|
curl.se: '*'
|
|
# ^^ Apple adds patches to curl on Darwin that prevent breakage with this pkg
|
|
# NOTE maybe in general we should just use darwin curl?
|
|
# https://github.com/pkgxdev/pantry/issues/3520
|
|
|
|
build:
|
|
dependencies:
|
|
rust-lang.org: '*'
|
|
gnu.org/tar: '*'
|
|
tukaani.org/xz: '*'
|
|
freedesktop.org/pkg-config: ^0.29
|
|
rust-lang.org/cargo: '*'
|
|
script:
|
|
# otherwise we are not ABI compatible and new macOS versions may break
|
|
# this happened with Sonoma
|
|
# this instead seems to break cargo on sonoma
|
|
# after 0.75
|
|
- run: |
|
|
sed -i "/^\[features\]\$/a\
|
|
default = ['curl/force-system-lib-on-osx']" \
|
|
Cargo.toml
|
|
if: <0.76.0
|
|
- cargo install --root={{ prefix }} --path=.
|
|
env:
|
|
LIBGIT2_SYS_USE_PKG_CONFIG: 1
|
|
LIBSSH2_SYS_USE_PKG_CONFIG: 1
|
|
|
|
test:
|
|
dependencies: #FIXME brewkit should add companions to the test env
|
|
git-scm.org: ^2
|
|
rust-lang.org: '*'
|
|
script:
|
|
- cargo init . --name xyz_tea_fixture
|
|
- echo 'fn main() {println!("Hello World!");}' >src/main.rs
|
|
- cargo clippy
|
|
- cargo run
|
|
- cargo run --release
|
|
# use our $HOME
|
|
- export CARGO_INSTALL_ROOT=$HOME/.local
|
|
- cargo install cowsay
|
|
- test -x ~/.local/bin/cowsay
|
|
- ~/.local/bin/cowsay xyz.tea.hi
|