TheDocumentation 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.
die/ directory under pkgs/ contains all base build-system templates. Every ix.sh starts with {% extends %} pointing at exactly one of these templates, inheriting the complete build pipeline — dependency wiring, compiler flag injection, install-time cleanup, and cross-compilation support — for that build system. You only override what differs from the default behavior.
Template Selection Table
Choose the template that matches the upstream build system. When unsure, look for an existing package inpkgs/ that uses a similar build system and copy its template choice.
| Template | {% extends … %} | When to use |
|---|---|---|
| GNU Make | //die/c/make.sh | make && make install, no configure script |
| Autoconf | //die/c/configure.sh | ./configure && make && make install |
| Autotools | //die/c/autohell.sh | autoconf + automake, autoreconf needed |
| Autotools (rehell) | //die/c/autorehell.sh | Always prefer over autohell.sh |
| CMake | //die/c/cmake.sh | CMake |
| Meson | //die/c/meson.sh | Meson |
| Ninja (raw) | //die/c/ninja.sh | Ninja without CMake or Meson |
| WAF | //die/c/waf.sh | WAF build system |
| GN | //die/c/gn.sh | Google’s GN (Chromium ecosystem) |
| Kconfig | //die/c/kconfig.sh | Linux kernel-style Kconfig |
| Rust/Cargo | //die/rust/cargo.sh | Cargo packages (vendored .pzd) |
| Go modules | //die/go/build.sh | Go (vendored .pzd) |
| Meta (hub) | //die/hub.sh | No build; wires together other packages |
| Generated | //die/gen.sh | Shell-only install step, no compilation |
Autotools Note
Always usedie/c/autorehell.sh instead of die/c/autohell.sh. The autorehell.sh template runs autoreconf to regenerate the build system from configure.ac, which produces cleaner and more reliable results than using a pre-generated configure script. Only fall back to autohell.sh if autoreconf genuinely fails for a particular package.
When configure.ac uses AX_* macros from the GNU Autoconf Archive, add bld/auto/archive to bld_tool:
The Template Inheritance Chain
The templates form a deep inheritance hierarchy. Understanding it helps you know which blocks exist and where to override them.die/c/ix.sh as their base, then diverge:
Rust Packages
Rust packages extend//die/rust/cargo.sh. The template uses vendored dependencies stored as a .pzd archive in the content-addressed store. The build runs cargo build --offline against the vendored tree.
cargo_sha block holds the SHA-256 of the internally built .pzd vendored archive — not the hash of the downloaded source tarball. See Fetching Sources for the difference.
When a Rust package fails to link, check bld_libs first. The Rust linker wrapper (bld/rust/helpers/cc/cc.py) tries three compilers in sequence for each link invocation, so linker errors from missing C libraries appear multiple times in the log — this is normal, not multiple distinct failures.
Go Packages
Go packages extend//die/go/build.sh. Like Rust, the build uses a vendored .pzd archive and runs go build -mod=vendor offline. GOOS and GOARCH are set from the target architecture automatically.
| Block | Purpose |
|---|---|
go_url | URL of the source tarball |
go_sha | SHA-256 of the vendored .pzd archive |
go_bins | Binaries to copy to ${out}/bin/ |
go_tags | Build tags passed as -tags a,b,c |
go_tool | Go toolchain version (e.g. bin/go/lang/21) |
go_refine | Shell commands to patch sources before vendoring |
t/ template pattern: a shared base template at bin/foo/t/ix.sh with go_url and go_sha, individual binary packages at bin/foo/bar/ix.sh and bin/foo/baz/ix.sh, and a hub at bin/foo/ix.sh collecting them.
Meta Packages (hub)
//die/hub.sh produces no build artifact of its own. It simply declares which other packages form a logical unit. Use it to group packages a user would want together, or to provide a stable name that selects an implementation based on flags or architecture.
lib/z with default flags on x86_64 resolves to lib/z/ng; lib/z(zlib_ver=stock) resolves to lib/z/stock.