mix_package

Synthetic vendored package generated from a locked Mix dependency graph.

Description#

mix_package is emitted by mix_dependencies; it is not intended for manual declaration. Each target represents one Mix application and carries the exact version, source identity, checksums, repository, and Git revision available in mix.lock.

For a Mix-managed package, the target runs the compiler pipeline registered by the vendored project. For a Rebar-managed package, it generates a sanitized Rebar configuration, stages the package source into an isolated directory, and invokes Rebar 3 directly. Dependency application outputs are declared inputs in both modes. Hex runs offline, and the package writes bytecode, private files, and include files into target-owned outputs. Source-provided Rebar application metadata is staged before compilation and validated afterward.

When the owning dependency set declares root configuration, Mix-managed packages read it before compilation with the root graph environment and target. The package then compiles with its own Mix environment, as reported by the resolver.

A Make-only manager or custom dependency compile command fails before actions are declared. This prevents Once from silently compiling a package with the wrong semantics.

Resolver-Owned Attributes#

AttributeTypeMeaning
_mix_lockedboolProves the target was generated with locked identity data
_mix_package_namestringHex registry package name
_mix_sourcestringStable Hex or Git source identity
_mix_checksumstringHex package checksum
_mix_outer_checksumstringHex registry checksum
_mix_revisionstringLocked Git revision
_mix_repositorystringHex repository or Git repository identity
_mix_managerslist<string>Build managers reported by Mix and the lockfile
_mix_custom_compileboolWhether the dependency overrides its compile command
_mix_source_rootstringPackage-relative vendored source root
_mix_manifeststringRoot Mix manifest used during resolution
_mix_lockfilestringRoot authoritative lockfile
_mix_root_config_entrystringRoot configuration entry loaded before package compilation
_mix_root_config_envstringRoot graph environment used to read configuration
_mix_root_config_targetstringRoot Mix target used to read configuration

The target also receives the application metadata attributes shared with elixir_library, including app_name, version, and mix_env.

Dependency Edges#

EdgeAcceptsDescription
depselixir_appLocked package dependencies reported by Mix

Providers#

The target emits elixir_app.

Provider Record#

FieldTypeMeaning
app_namestringMix application name
package_namestringRegistry package name
versionstringLocked package version or Git revision
sourcestringStable locked source identity
checksumstringHex package checksum when present
outer_checksumstringHex registry checksum when present
revisionstringGit revision when present
repositorystringHex repository or Git repository
managerslist<string>Native build manager metadata
ebin_dirstringCompiled application bytecode directory
priv_dirstringPrivate application output directory
include_dirstringErlang include output directory
compile_metadatastringRebar application validation marker when Rebar is used
compile_warningsstringPersisted compiler warning diagnostics
transitive_elixir_appslist<record>This package plus reachable package applications
transitive_sourceslist<string>Vendored sources for this package and its dependencies

Capabilities#

CapabilityOutput groups
buildbytecode

Sources#