Every IX package recipe must declare its source and a checksum. IX supports tarball downloads, git repository checkouts, and multi-archive fetches. Checksums are mandatory — IX builds are hermetic, and every source is verified before unpacking. There are four distinct types of hash used across different package templates, and understanding the difference is essential when updating packages.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/pg83/ix/llms.txt
Use this file to discover all available pages before exploring further.
Tarball Fetch (C/C++ Packages)
The most common fetch pattern. Thefetch block contains a URL on the first line and its SHA-256 hex digest on the second line. The URL can reference the version block via {{self.version().strip()}}.
${src} before any build steps run.
Git Source
For packages fetched directly from a git repository, use thegit_repo, git_branch, and git_sha blocks instead of fetch.
<git_repo>/archive/refs/tags/<git_branch>.tar.gz and builds a vendored .pzd archive from it. The git_sha is the SHA-256 of that .pzd archive — not a git commit hash. See The Four Hash Types below for the distinction.
Multiple Fetch URLs
Thefetch block is parsed as a sequence of (url, sha256) pairs. To download multiple archives, list them one after another:
${src} before the build steps run.
The Four Hash Types
IX uses four distinct hash types across its package templates. Using the wrong type or confusing them will cause build failures.1. fetch block sha — C/C++ packages
The SHA-256 of the downloaded tarball file itself. This is a straightforward checksum of the archive as downloaded from the URL.
curl -sL <url> | sha256sum
2. go_sha — Go packages
The SHA-256 of the internally built .pzd vendored archive — a packed, deterministic tree with all Go modules resolved by go mod vendor. This is not the hash of the downloaded tarball.
3. cargo_sha — Rust packages
Same principle as go_sha. The SHA-256 of the internally built .pzd vendored archive with all Rust crate dependencies resolved by cargo vendor. Not the source tarball hash.
4. git_sha — git-sourced packages
The SHA-256 of the internally built .pzd archive created from a git checkout. Not a commit SHA, not a tag hash.
.pzd hash types go through the same aux/fetch intermediate build step, which: downloads or clones the source, runs language-specific dependency resolution (go mod vendor / cargo vendor / git submodule update), packs everything into a deterministic .pzd archive via stable_pack_v3, then verifies the hash matches the declared sha.
Updating Tarball Packages
For packages using thefetch block (C/C++ packages extending die/c/*.sh):
- Update the
versionblock with the new version string. - Compute the new hash:
curl -sL <new_url> | sha256sum - Replace the old hash in the
fetchblock with the new one. - Run
./ix build <package>and fix any build errors.
Updating Go, Rust, and Git Packages
For packages usinggo_sha, cargo_sha, or git_sha, you cannot compute the hash in advance — it depends on the internally resolved dependency tree. The procedure is:
- Update the URL, version, or branch to the new value.
- Set the sha to all zeros:
0000000000000000000000000000000000000000000000000000000000000000 - Update the compiler/tool version if needed (check
go.modfor Go version,rust-toolchainfor Rust). - Run
./ix build <package>. The build will fail with a checksum mismatch. - Find the real SHA in the build log — look for the
sha256sumoutput line showing the actual hash of the.pzdfile. - Replace the zeros with the real hash.
- Run
./ix build <package>again — it should now succeed.