Automic VaultAutomic Vault

brew

使用 Homebrew, apt, Nix 安装 hpack

查看 hpack 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install hpack

local Homebrew formula metadata

概览

软件包摘要

Modern format for Haskell packages

命令和别名

  • hpack

历史

项目历史与用法

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.

项目历史

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.

采用历史

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.

使用方式

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.

为什么软件包爱好者会关心

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.

时间线

  • 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.

安全态势

风险级别:绿色

narrow executable package without higher-risk signals.

风险分类器

绿色 风险 · 低 置信度 · appliance

原因

  • narrow executable package without higher-risk signals

信号

  • metadata:no-higher-risk-signals

安装行为

  • formula 元数据中未记录 Homebrew post-install 钩子。
  • Homebrew bottle 元数据适用于 6 个平台目标。
  • 安装时包含 1 个运行时依赖。
  • 构建元数据列出 2 个构建依赖。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

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

可执行文件

已安装的可执行文件

命令类型暴露范围备注
hpackcli全局可执行文件

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-07-25
管理器版本0.39.6
管理器更新时间2026-07-22
本地数据OK
上游not checked
检测到的最新版本未检测到

https://github.com/sol/hpack

安装元数据

软件包元数据

软件包键brew:hpack
版本0.39.6
软件包管理器Homebrew
软件包管理器页面https://formulae.brew.sh/formula/hpack
主页https://github.com/sol/hpack
仓库https://github.com/sol/hpack
上游文档https://github.com/sol/hpack#readme
许可证MIT
源码归档https://hackage.haskell.org/package/hpack-0.39.6/hpack-0.39.6.tar.gz
最后更新2026-07-22T03:24:33Z
Pulseupdated
依赖gmp
构建依赖cabal-install, ghc
macOS 提供的库libffi
Bottle可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
Homebrew post-install未定义
服务未声明

注册表事实

源数据库详情

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

源数据库匹配

其他软件包管理器记录

匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。

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 依赖
  • normalized package name match
  • 匹配方式: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
  • 匹配方式: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 依赖
  • normalized package name match
  • 匹配方式: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

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

使用的来源

  • 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