File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ class Pgrx < Formula
2+ desc "Build Postgres Extensions with Rust"
3+ homepage "https://github.com/pgcentralfoundation/pgrx"
4+ url "https://github.com/pgcentralfoundation/pgrx/archive/refs/tags/v0.12.9.tar.gz"
5+ sha256 "53358008dd2d63293539440b03099cdf7165f8078f1000ed6ad4ed67064309d4"
6+ license "MIT"
7+
8+ depends_on "pkgconf" => :build
9+ depends_on "rust" => :build
10+ depends_on "rustup" => :test
11+ depends_on "openssl@3"
12+
13+ uses_from_macos "zlib"
14+
15+ def install
16+ system "cargo" , "install" , *std_cargo_args ( path : "cargo-pgrx" )
17+ end
18+
19+ test do
20+ # Show that we can use a different toolchain than the one provided by the `rust` formula.
21+ # https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359
22+ ENV . prepend_path "PATH" , Formula [ "rustup" ] . bin
23+ system "rustup" , "default" , "beta"
24+ system "rustup" , "set" , "profile" , "minimal"
25+
26+ system "cargo" , "pgrx" , "new" , "my_extension"
27+ assert_predicate testpath /"my_extension/my_extension.control" , :exist?
28+ end
29+ end
You can’t perform that action at this time.
0 commit comments