Installing pGenie on macOS¶
There are two ways to install pGenie on macOS: using Homebrew or building from source.
Option 1 — Homebrew (Recommended)¶
The Homebrew tap provides two installation modes.
Install pre-built binary (fastest)¶
This installs a pre-built binary for your Mac architecture (Apple Silicon or Intel) with no additional dependencies.
Build from source via Homebrew¶
This builds from the latest master branch and can take several minutes during the first build.
Option 2 — From Source¶
Building from source gives you full control and avoids the Gatekeeper warning.
Prerequisites¶
Install the libpq library via Homebrew:
Stack¶
Stack manages the compiler and dependencies entirely on its own, making it the fastest path to building pGenie from source. No separate toolchain installation is required.
-
Install Stack
Run the official one-line installer:
For platform-specific instructions and alternative install methods, see the official Stack installation guide.
-
Clone the repository:
-
Install the
pgnexecutable:Stack will download the required GHC version automatically if needed, compile pGenie, and install the
pgnbinary into~/.local/bin/. -
Ensure
~/.local/binis on yourPATH. Add the following to your shell profile (.zshrc,.bashrc, etc.): -
Verify the installation:
Cabal¶
Cabal is the standard Haskell build tool. It requires a GHC compiler to be installed separately, which you can obtain via GHCup.
-
Install the Haskell toolchain via GHCup:
Follow the prompts. GHCup will install GHC and Cabal.
-
Clone the repository:
-
Install the
pgnexecutable:Cabal will compile pGenie and install the
pgnbinary into~/.cabal/bin/. -
Ensure
~/.cabal/binis on yourPATH. Add the following to your shell profile (.zshrc,.bashrc, etc.): -
Verify the installation:
Docker Requirement¶
Docker must be running before invoking pgn. With Docker Desktop, the Docker icon should appear in the macOS menu bar. With Colima, ensure you have run colima start.