Automic VaultAutomic Vault

brew

Install hpack with Homebrew, apt, Nix

Modern format for Haskell packages. Version 0.39.6 via Homebrew; verified 2026-06-13.

install

Additional install commands

macOS

Homebrewverified · 100%
brew install hpack

local Homebrew formula metadata

overview

Package summary

Modern format for Haskell packages

Commands and aliases

  • hpack

history

Project history and usage

hpack is a Haskell packaging tool and package-description format built around `package.yaml`. It generates Cabal files while trying to reduce repetition and make common package metadata less verbose.

Project history

Simon Hengel's hpack appeared on Hackage in April 2015 with version 0.1.0. The project README describes it as a modern alternative to the Cabal package format, guided by three principles: infer obvious information, give users control when needed, and avoid repeating metadata.

hpack developed alongside Cabal rather than replacing it. The executable reads `package.yaml` and renders a `.cabal` file, while its changelog tracks years of Cabal compatibility work: SPDX license handling, generated module behavior, internal libraries, `build-tool-depends`, Cabal version inference, and support for newer GHC and Cabal releases.

Adoption history

The README documents native `package.yaml` support in Stack and cabal2nix, while Hackage lists reverse dependencies including stack, pantry, cabal2nix, stack2cabal, stack-lib, and stackage2nix. That places hpack in the machinery around Haskell project templates, Stackage snapshots, and Nix conversion.

Homebrew, Hackage, Stackage, and Linux distribution packaging make hpack available both as a Haskell library/program and as a standalone CLI. Its adoption is tied to `package.yaml` becoming a common Haskell project file, especially in Stack-oriented projects.

How it is used

Users write package metadata in `package.yaml`. Stack can consume that file directly, cabal2nix supports it natively, and other workflows can run `hpack` to generate the `.cabal` file before building.

hpack also supports practical package-authoring features such as defaults files, globbing, verbatim Cabal fields, generated module controls, common fields, conditionals, executables, tests, benchmarks, and dependency syntax intended to keep package descriptions maintainable.

Why package nerds care

hpack is important because it sits at the contested boundary between package metadata as a human-maintained source file and package metadata as generated build-tool input. Package nerds care about that boundary: generated `.cabal` files can reduce repetition, but they also introduce questions about source-of-truth, reproducibility, diffs, and downstream tooling.

Its long changelog is also a miniature history of Haskell packaging pressure points, from SPDX licenses and Cabal version syntax to generated modules and compatibility with Stack, Stackage, Nix, and newer Cabal releases.

Timeline

  • 2015: Hackage records hpack 0.1.0 uploaded by Simon Hengel.
  • 0.18.0: The changelog adds command-line input-file handling and executable shorthand.
  • 0.29.0: The changelog adds Cabal 2.1/2.2-related rendering and SPDX license handling.
  • 0.36.0: The changelog changes `Paths_` module inference for package specs using spec-version 0.36.0 or later.
  • 2026: Hackage records hpack 0.39.6, adding top-level `codeberg` support.

Related projects

  • Cabal is the package format and build-tool ecosystem that hpack generates into.
  • Stack has built-in support for hpack's `package.yaml` workflow.
  • cabal2nix supports `package.yaml` natively, connecting hpack to Nix packaging workflows.
  • Stackage-related tools such as pantry, stack2cabal, stack-lib, and stackage2nix appear in Hackage reverse-dependency metadata.

security posture

Risk level: green

narrow executable package without higher-risk signals.

Risk classifier

green risk · low confidence · appliance

Why

  • narrow executable package without higher-risk signals

Signals

  • metadata:no-higher-risk-signals

Install behavior

  • No Homebrew post-install hook is recorded in formula metadata.
  • Homebrew bottle metadata is available for 6 platform targets.
  • Installs with 1 runtime dependencies.
  • Build metadata lists 2 build dependencies.

Recommended review

Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.

local files

Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.

Configuration files

Config paths the tool may read or write during local use.

Unix
package.yaml

executables

Installed executables

CommandKindExposureNote
hpackcliglobal executable

freshness

Version and freshness

These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.

page generated2026-07-08
manager version0.39.6
manager updated2026-06-13
local dataok
upstreamnot checked
latest detectednot detected

https://github.com/sol/hpack

install metadata

Package metadata

Package keybrew:hpack
Version0.39.6
Package managerHomebrew
Package manager pagehttps://formulae.brew.sh/formula/hpack
Homepagehttps://github.com/sol/hpack
Repositoryhttps://github.com/sol/hpack
Upstream docshttps://github.com/sol/hpack#readme
LicenseMIT
Source archivehttps://hackage.haskell.org/package/hpack-0.39.6/hpack-0.39.6.tar.gz
Last updated2026-06-13T23:34:58+02:00
Pulseupdated
Dependenciesgmp
Build dependenciescabal-install, ghc
Uses from macOSlibffi
Bottleavailable (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
Homebrew post-installnot defined
Servicenone declared

registry facts

Source database details

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namehpack
Version Scheme0
Revision0
Head VersionHEAD
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • head
  • stable

source database matches

Other package-manager records

Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.

Debian apt95%

hpack 0.36.1-1+b1

alternative format for Haskell packages

https://github.com/sol/hpack#readme

sudo apt install hpack
  • Section: haskell
  • Architecture: amd64
  • Source Package: haskell-hpack
  • 6 dependencies
  • normalized package name match
  • Matched by: Hpack
Debian stable package indexes · deb.debian.org · Debian stable package indexes: hpack from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Nix95%

hpack

nix profile install nixpkgs#hpack
  • normalized package name match
  • Matched by: Hpack
nixpkgs package indexes · raw.githubusercontent.com · nixpkgs package indexes: hpack from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
Ubuntu apt95%

hpack 0.35.2-1

alternative format for Haskell packages

https://github.com/sol/hpack#readme

sudo apt install hpack
  • Section: universe/haskell
  • Architecture: amd64
  • Source Package: haskell-hpack
  • 5 dependencies
  • normalized package name match
  • Matched by: Hpack
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: hpack from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz

source trail

Generated from repository data

This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.

Used sources

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated configuration and credential file locations
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment