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.
ix build creates an ephemeral (temporary) realm containing the packages you specify. It is equivalent to running ix let over a fresh realm with no prior package list — it compiles everything from scratch without touching any existing realm. This makes it the right tool for verifying that a package or a set of packages builds correctly, for testing a new recipe, or for inspecting what a clean composition would look like before promoting it to a permanent realm.
Building a Single Package
Pass the package identifier directly toix build. The ./ix prefix is used here because IX is typically invoked from the repository root rather than from a system-wide installation.
Building with Flags
Flags follow the same--name=value syntax used by ix mut. Pass them after the package name to parametrize the build.
ix mut.
Running a Command in a Built Realm: ix run
ix run prepares a new ephemeral realm containing the requested packages and then executes an arbitrary command inside it. Use the -- separator to mark the boundary between the package/flag list and the command to run.
-- is interpreted as packages or flags; everything after -- is the command line passed to the shell. This lets you experiment with a binary or run a one-off tool without touching any realm.
When
-- is omitted, ix run attempts to resolve the first argument as a binary name in the IX package database and uses that package automatically.Verbose and Debug Output
Two mechanisms are available for more detailed build output. TheIX_VERBOSE environment variable causes IX to print package dependencies as they are resolved during the build. IX only checks whether the variable is set — any non-empty value activates it:
--setx --verbose to enable a detailed shell trace of every step executed by the build script:
Viewing the Build Graph
SettingIX_DUMP_GRAPH causes IX to print the full build graph as JSON and exit immediately without actually building anything. IX only checks whether the variable is set — any non-empty value activates it. This is useful for understanding the dependency structure of a package before committing to a potentially long build.
Finding Dependencies: ix dep
ix dep prints the list of ix.sh recipe files involved in building a package. This is a quick way to identify which recipes contribute to a package’s dependency graph without triggering an actual build.
ix.sh file under the pkgs/ directory tree.
Build Output Capture
Build output in IX flows through theassemble subprocess and can be substantial — especially for large packages like compilers or language runtimes. Redirect standard output and standard error to a log file so nothing is lost:
ix build is equivalent to ix let over a temporary ephemeral realm. It builds and resolves the dependency graph fully but does not create or modify any named realm anchor. No existing realm is affected.