Skip to content

Commit

Permalink
vauls: add dynamic option
Browse files Browse the repository at this point in the history
- Add option “with-dynamic” to vault, in order to optionally build with CGO_ENABLED
- This is a common use case for VPN users on Mac OS X
- See: hashicorp/vault#1159, hashicorp/vault#712

Closes #7238.

Signed-off-by: Alex Dunn <dunn.alex@gmail.com>
  • Loading branch information
ProbablyRusty authored and dunn committed Dec 10, 2016
1 parent e349eef commit 3a9a2ab
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Formula/vault.rb
Expand Up @@ -18,6 +18,8 @@ class Vault < Formula
sha256 "af8867dfa593c61bf441fccb3e30611364a13fcd5bfed4c297860f109ad4e560" => :yosemite
end

option "with-dynamic", "Build dynamic binary with CGO_ENABLED=1"

depends_on "go" => :build

go_resource "github.com/mitchellh/iochan" do
Expand Down Expand Up @@ -45,7 +47,8 @@ def install
end

cd "src/github.com/hashicorp/vault" do
system "make", "dev"
target = build.with?("dynamic") ? "dev-dynamic" : "dev"
system "make", target
bin.install "bin/vault"
prefix.install_metafiles
end
Expand Down

0 comments on commit 3a9a2ab

Please sign in to comment.