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

needle 0.18.1 #99203

Closed
wants to merge 1 commit into from
Closed
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
18 changes: 12 additions & 6 deletions Formula/needle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ class Needle < Formula
desc "Compile-time safe Swift dependency injection framework with real code"
homepage "https://github.com/uber/needle"
url "https://github.com/uber/needle.git",
tag: "v0.17.2",
revision: "6a2d5e25cd3c77ddfa57835e991469db791c4744"
tag: "v0.18.1",
revision: "bf2d46c461476fec7398f3b6a7bb70556e6925f0"
license "Apache-2.0"

bottle do
Expand All @@ -12,12 +12,18 @@ class Needle < Formula
sha256 cellar: :any, catalina: "f45fa77b9e00be408206fc2cf945f41ca3f4661bbb06c8d2aadd015f4d75dfdd"
end

depends_on xcode: ["12.2", :build]
depends_on "swift" => :build # for copying lib_InternalSwiftSyntaxParser.dylib

def install
system "make", "install", "BINARY_FOLDER_PREFIX=#{prefix}"
bin.install "./Generator/bin/needle"
libexec.install "./Generator/bin/lib_InternalSwiftSyntaxParser.dylib"
# Install lib_InternalSwiftSyntaxParser.dylib from swift formula to guarantee
# an open-source copy as opposed to copying from Xcode.app toolchain
inreplace "Makefile", "$(XCODE_PATH)/Toolchains/XcodeDefault.xctoolchain",
Formula["swift"].opt_prefix.glob("Swift-*.xctoolchain").first

system "make", "install", "BINARY_FOLDER_PREFIX=#{prefix}",
"SWIFT_BUILD_FLAGS=--disable-sandbox -c release"
bin.install "Generator/bin/needle"
libexec.install "Generator/bin/lib_InternalSwiftSyntaxParser.dylib"
end

test do
Expand Down