IX packages can expose configuration flags that users pass on the command line asDocumentation 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.
--name=value. Inside the recipe template, flags become Jinja2 variables that control build behavior — selecting implementations, enabling features, or adjusting install paths. Because flags are part of the content-addressed UID computation, the same package with different flags produces a distinct store path, allowing multiple variants to coexist.
Passing Flags on the Command Line
Flags are passed when building a package or when mutating a realm:Accessing Flags in Templates
Insideix.sh, flags are available as Jinja2 variables in the template context. Use | default(...) to provide fallback values:
1) work with {% if %}:
ix build bin/mypkg --debug=1
Architecture-derived boolean flags are also available directly in every template:
| Variable | True when |
|---|---|
x86_64 | Target is x86-64 |
aarch64 | Target is AArch64 |
linux | Target OS is Linux |
mingw32 | Target is Windows/MinGW |
native | Host equals target (no cross-compilation) |
boot | Building a toolchain bootstrap package |
Package Variants with Flags
Because flags are folded into the content-addressed UID, the same package with different flag values produces different store paths and can coexist in the store simultaneously:lib/z selects its implementation: lib/z is a hub that dispatches to lib/z/ng (zlib-ng, default on x86_64), lib/z/adler (on other arches), or lib/z/stock when zlib_ver=stock is passed.
Version Sub-packages
Versioned variants follow the path-component convention for version numbers:| Package path | Meaning |
|---|---|
bin/auto/conf/2/72 | autoconf 2.72 |
bin/bash/5 | bash 5 |
lib/openssl/3 | OpenSSL 3.x |
lib/openssl/1 | OpenSSL 1.1 (legacy) |
bin/curl/openssl | curl built against OpenSSL |
bin/curl/gnutls | curl built against GnuTLS |
lib/openssl, bin/curl) is a hub that selects a default implementation via lib_deps or run_deps, and can be overridden with a flag:
lib/openssl and get version 3 by default. To pin version 1: lib/openssl(libopenssl_ver=1).
The unwrap and runit Suffixes
Two suffixes appear throughout the bin/ tree with fixed meanings:
unwrap— the full package with all runtime dependencies composed in. For example,bin/git/unwrapis git plus its runtime deps (SSH client, credential helper, etc.), whereasbin/gitalone is the minimal binary.runit— service and init scripts for the runit supervisor. For example,bin/sshd/runitcontains the runitrunscript for the SSH daemon.
t suffix denotes an intermediate template package — a shared ix.sh base extended by sibling packages in the same tree, not meant to be built directly.