Having trouble making a formula work on both macOS and Linux #1085
-
It seems that Linux binaries are meant to be statically linked. However, I couldn't find any instructions on how to run different install commands depending on what the OS is. I have zero Ruby experience, so maybe the solution is quite obvious. For completeness, I just need to pass an argument to Is a better approach to have two different taps, one per OS? It seems that that is what homebrew does ( class GhLabelsCli < Formula
desc "CLI for managing labels in existing GitHub repositories"
homepage "https://github.com/SirWindfield/gh-labels-cli"
url "https://github.com/SirWindfield/gh-labels-cli/archive/v0.1.8.tar.gz"
sha256 "ad66dedf7fcd42d9c3cac0430a6e3d667cf4f197103392aa09635e5e2f3a2f84"
license any_of: ["Apache-2.0", "MIT"]
head "https://github.com/SirWindfield/gh-labels-cli.git"
depends_on "rust" => :build
# depends_on :macos
def install
system "cargo", "install", *std_cargo_args
end
test do
system "#{bin}/gh-labels", "help"
end
end |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
They are not, homebrew prefers shared binaries whenever possible.
Look in homebrew-core for usage of |
Beta Was this translation helpful? Give feedback.
They are not, homebrew prefers shared binaries whenever possible.
Look in homebrew-core for usage of
on_linux
andon_macos