For the pkl CLI, please provide an installer package for Homebrew #9

Closed
opened 2025-12-30 01:19:24 +01:00 by adam · 9 comments
Owner

Originally created by @ujay68 on GitHub (Feb 3, 2024).

Subject says all.

Homebrew (https://brew.sh/) is a very popular package manager for macOS where you can find almost any tool you might ever want to install.

Originally created by @ujay68 on GitHub (Feb 3, 2024). Subject says all. Homebrew (https://brew.sh/) is a very popular package manager for macOS where you can find almost any tool you might ever want to install.
adam closed this issue 2025-12-30 01:19:24 +01:00
Author
Owner

@stackoverflow commented on GitHub (Feb 3, 2024):

We already started the process of releasing Pkl to homebrew. Should come soon.

@stackoverflow commented on GitHub (Feb 3, 2024): We already started the process of releasing Pkl to homebrew. Should come soon.
Author
Owner

@bioball commented on GitHub (Feb 3, 2024):

Submitted here: https://github.com/Homebrew/homebrew-core/pull/161655

Looks like we need to re-submit as a cask.

@bioball commented on GitHub (Feb 3, 2024): Submitted here: https://github.com/Homebrew/homebrew-core/pull/161655 Looks like we need to re-submit as a cask.
Author
Owner

@ujay68 commented on GitHub (Feb 3, 2024):

Great. Thank you!

@ujay68 commented on GitHub (Feb 3, 2024): Great. Thank you!
Author
Owner

@austinarbor commented on GitHub (Feb 5, 2024):

I don't think cask is the right approach, something like the below should work

class Pkl < Formula
  desc "Configuration as code language with rich validation and tooling"
  homepage "https://pkl-lang.org"
  url "https://github.com/apple/pkl/archive/refs/tags/0.25.1.tar.gz"
  sha256 "f60412679a9a8a1740e81cbed89a3ca9ddc9aa2cf0c487ff8a8a9fce70c0bf4a"
  license "Apache-2.0"

  depends_on "openjdk@17" => :build

  def install
    ENV["JAVA_HOME"] = Formula["openjdk@17"].opt_prefix
    task_os = OS.mac? ? "mac" : "linux"
    task_arch = Hardware::CPU.arm? ? "Aarch64" : "Amd64"
    task_name = ":pkl-cli:#{task_os}Executable#{task_arch}"

    system "git", "apply", "patches/graalVm23.patch" if OS.mac? && Hardware::CPU.arm?

    system "./gradlew", task_name
    os = OS.mac? ? "macos" : "linux"
    arch = Hardware::CPU.arm? ? "aarch64" : "amd64"
    bin.install "pkl-cli/build/executable/pkl-#{os}-#{arch}" => "pkl"
  end
end

However, the problem I am having is with homebrew's shimmed cc. It is expecting the environment variable HOMEBREW_RUBY_PATH to be present, and something is wiping out that value in the task process before the cc invocation. I tried to see where it was getting removed from the environment but was unable to figure it out

@austinarbor commented on GitHub (Feb 5, 2024): I don't think cask is the right approach, something like the below should work ```ruby class Pkl < Formula desc "Configuration as code language with rich validation and tooling" homepage "https://pkl-lang.org" url "https://github.com/apple/pkl/archive/refs/tags/0.25.1.tar.gz" sha256 "f60412679a9a8a1740e81cbed89a3ca9ddc9aa2cf0c487ff8a8a9fce70c0bf4a" license "Apache-2.0" depends_on "openjdk@17" => :build def install ENV["JAVA_HOME"] = Formula["openjdk@17"].opt_prefix task_os = OS.mac? ? "mac" : "linux" task_arch = Hardware::CPU.arm? ? "Aarch64" : "Amd64" task_name = ":pkl-cli:#{task_os}Executable#{task_arch}" system "git", "apply", "patches/graalVm23.patch" if OS.mac? && Hardware::CPU.arm? system "./gradlew", task_name os = OS.mac? ? "macos" : "linux" arch = Hardware::CPU.arm? ? "aarch64" : "amd64" bin.install "pkl-cli/build/executable/pkl-#{os}-#{arch}" => "pkl" end end ``` However, the problem I am having is with homebrew's shimmed `cc`. It is expecting the environment variable `HOMEBREW_RUBY_PATH` to be present, and something is wiping out that value in the task process before the `cc` invocation. I tried to see where it was getting removed from the environment but was unable to figure it out
Author
Owner

@mattpackwood commented on GitHub (Feb 20, 2024):

It looks like the submission has been stalled on the Homebrew side, is that the status?

@mattpackwood commented on GitHub (Feb 20, 2024): It looks like the submission has been stalled on the Homebrew side, is that the status?
Author
Owner

@pavelzw commented on GitHub (Feb 20, 2024):

It looks like the submission has been stalled on the Homebrew side, is that the status?

there is a new submission https://github.com/Homebrew/homebrew-core/pull/162857

@pavelzw commented on GitHub (Feb 20, 2024): > It looks like the submission has been stalled on the Homebrew side, is that the status? there is a new submission https://github.com/Homebrew/homebrew-core/pull/162857
Author
Owner

@mattpackwood commented on GitHub (Feb 24, 2024):

@pavelzw It looks like you (we) are just waiting for someone to approve the merge?

@mattpackwood commented on GitHub (Feb 24, 2024): @pavelzw It looks like you (we) are just waiting for someone to approve the merge?
Author
Owner

@bioball commented on GitHub (Feb 26, 2024):

Yeah, right now we are waiting for a homebrew maintainer to approve and merge the PR.

@bioball commented on GitHub (Feb 26, 2024): Yeah, right now we are waiting for a homebrew maintainer to approve and merge the PR.
Author
Owner

@bioball commented on GitHub (Feb 29, 2024):

This is now available on homebrew! brew install pkl will install the CLI.

We are adding instructions to our website in https://github.com/apple/pkl/pull/270.

@bioball commented on GitHub (Feb 29, 2024): This is now available on homebrew! `brew install pkl` will install the CLI. We are adding instructions to our website in https://github.com/apple/pkl/pull/270.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#9