Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

signal-cli: use rustup #178043

Merged
merged 1 commit into from
Jul 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions Formula/s/signal-cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ class SignalCli < Formula
depends_on "cmake" => :build # For `boring-sys` crate in `libsignal-client`
depends_on "gradle" => :build
depends_on "protobuf" => :build
# the libsignal-client build targets a specific rustc listed in the file
# libsignal-client requires a specific version of rustc
# https://github.com/signalapp/libsignal/blob/#{libsignal-client.version}/rust-toolchain
# which doesn't automatically happen if we use brew-installed rust. rustup-init
# allows us to use a toolchain that lives in HOMEBREW_CACHE
depends_on "rustup-init" => :build

depends_on "openjdk@21"
Expand All @@ -47,10 +45,6 @@ def install
(libexec/"bin/signal-cli.bat").unlink
(bin/"signal-cli").write_env_script libexec/"bin/signal-cli", Language::Java.overridable_java_home_env("21")

# this will install the necessary cargo/rustup toolchain bits in HOMEBREW_CACHE
system Formula["rustup-init"].bin/"rustup-init", "-qy", "--no-modify-path"
ENV.prepend_path "PATH", HOMEBREW_CACHE/"cargo_cache/bin"

resource("libsignal-client").stage do |r|
# https://github.com/AsamK/signal-cli/wiki/Provide-native-lib-for-libsignal#manual-build

Expand Down
Loading