#Build profiles
Every application with a build.toml under storage/data/apps/<name>/build.toml is buildable. Nothing is hardcoded in Python: the profile declares what to do, the builder executes it.
#Minimal profile
[source]kind = "configure"[configure]options = [verify]libraries = "lib/libz.so*"#[source]
| Key | Meaning |
|---|---|
kind | build system: autoconf, configure, cmake, meson, make, openssl, icu, python, binary |
build_dir | subdirectory where the build runs (out-of-tree builds) |
patches | patch files applied once after extraction |
#[dependencies]
[dependencies]libs = "openssl" "pcre2" "zlib"Names are catalog entries. The plan resolves them recursively, dependencies first, and rejects cycles:
openssl → pcre2 → zlib → nginxLibraries are not only headers: CPPFLAGS, LDFLAGS, PKG_CONFIG_PATH and CMAKE_PREFIX_PATH are built from their prefixes.
#[configure]
[configure] Commands run before ./configure in order as argv arrays.pre = "autoreconf" "-fi"options = "--with-zlib" "--with-openssl={lib:openssl}"Token expansion works in options, pre, make args, install command and [env] values:
| Token | Expands to |
|---|---|
{lib:name} | prefix of a declared library |
{prefix} | the application's own install prefix |
Third-party sources (nginx modules) go in [configure] modules:
modules = name = "ndk" path = "web/nginx-modules/ndk/0.3.3" name = "geoip2" path = "web/nginx-modules/geoip2/3.4" Each archive is extracted into <work>/modules/<name> and passed as --add-module=…. Order matters when a module depends on another (ndk before set-misc).
#[make]
[make]args = "BUILD_TLS=yes" "OPENSSL_PREFIX={lib:openssl}"targets = "build" "redis"jobs = "auto"args and targets are passed to both compile and install, because many Makefiles declare install: all.
#[install]
[install]command = "install" "-D" "-m" "755" "vsftpd" "{prefix}/sbin/vsftpd"When present it replaces make install, for Makefiles that ignore PREFIX. Otherwise the builder passes both PREFIX= and prefix= (git uses the lowercase one).
#[system]
[system]packages = "libpq-dev" "default-libmysqlclient-dev"groups = "postdrop"users = "postfix"Packages are installed through uapi.packages (index refreshed only when something is missing). Accounts are created before the install step, groups first so useradd finds them.
#[env]
[env]CFLAGS = "-O2 -std=gnu17"LIBS = "-lsharpyuv"Values support {lib:…} and {prefix}. They are merged over the computed environment, so a profile wins.
#[verify]
[verify]binaries = "sbin/nginx" # exists and is executablelibraries = "lib/libssl.so*" # at least one glob matchcommands = "sbin/nginx" "-V" # must exit zeroCommands run with the prefix and its libraries on LD_LIBRARY_PATH, so a freshly built binary is checked the way it will run.
On success the prefix gets .aegis-installed with the profile fingerprint; on failure .aegis-failed, which makes the next run rebuild it.
#[extensions] (PHP)
[extensions]build = name = "igbinary" path = "web/pecl/igbinary/3.2.17RC1" name = "redis" path = "web/pecl/redis/6.3.0" args = "--enable-redis-igbinary" name = "imagick" path = "web/pecl/imagick/3.8.1" args = "--with-imagick={lib:imagemagick}" Built after PHP itself: phpize, ./configure --with-php-config=…, make, make install, into the PHP prefix.
igbinary is pinned to 3.2.17RC1 because 3.2.16 does not build against PHP 8.5: it includes ext/standard/php_smart_string.h, which PHP 8.5 no longer ships. The release candidate is what PECL publishes for 8.5.
#Patches
storage/data/apps/<app>/patches/<name>.patch[source]kind = "make"patches = "modern-toolchain.patch"Applied with patch -p1 inside the extracted source, once. The .prepared marker stores the artifact checksum and the patch list, so changing either re-extracts and re-applies automatically.
Write patches without blank context lines — GNU patch then reports Hunk #1 FAILED even when the content matches.
#Kinds
| kind | configure | compile | install |
|---|---|---|---|
autoconf / configure | ./configure --prefix=… | make -jN | make install |
cmake | cmake -S . -B build | cmake --build build | cmake --install build |
meson | meson setup build | ninja -C build | ninja -C build install |
make | profile pre only | make <args> <targets> | make <args> install |
openssl | ./Configure <arch> --libdir=lib | make | make install_sw |
icu | ./configure | make | make install |
python | — | pip install into the runtime | — |
binary | — | — | copy the artifact to <prefix>/bin/<name> |
openssl picks linux-x86_64 or linux-aarch64 from platform.machine().