alire-purifier full guide

Detailed setup, dependency management, build commands, and troubleshooting. Start with the overview for the initial commands; use the sections below for the complete setup and behavior. alire-purifier is classified at maturity tier 4 (see tier assessment for details).

Contents

Setup and activation

Use the overview’s Quickstart for the initial command sequence. The setup details below apply to that workflow.

Alire’s native resolver selects the dependencies from alire.toml. Nix fetches those revisions, generates their native configurations, builds them and installs their GPR projects. Your project builds in its working tree.

Commit alire-purifier.lock.json. Source edits do not require relocking. Change the native manifest and update the lock to select other dependencies:

alire-purifier lock --update

The shell provides Alire, GNAT and GPR tools. Wrappers without a lockfile warn and run the ordinary, impure tools. Invalid or stale locks fail. The integration can also be installed through your normal Nix configuration.

Version compatibility

Tool or language Packaged defaults Tested versions
Alire 2.1.1 —
GNAT 16.2.0 —

Operating systems and architectures

OS CPU architecture Packaged toolchain Recorded workflow
Linux ARM64 Yes Not recorded
Linux x86-64 Yes Tested

Development loop

alr clean
alr printenv
alire-purifier exec -- your-editor

Using locked dependencies

Alire sees the compiled dependencies as native external packages. Their versions and dependency constraints remain in its solution, and their GPR projects point at readonly Nix sources and libraries. Private Alire settings and native project metadata keep the working-tree build mutable.

--input path tracks additional selection files. Use --project and --lock for an external companion; native wrappers accept ALIRE_PURIFIER_PROJECT and ALIRE_PURIFIER_LOCK. Environment generations retain their dependency and SDK closures for garbage collection.

Working offline

alire-purifier prefetch

Language tooling integration

GNAT and GPR-based editors use the same native project environment. Root project commands retain their ordinary network access.

Nix builds

An optional definition can use the overlay’s named builder:

pkgs.alire-purifier.buildAlireProject {
  src = ./.;
}

It exposes evaluation-known packages, tests, release and fetches. libraryOverrides supplies crate-specific build changes.

Project projections

This integration provides native release artifacts, rather than a typed cross-purifier project projection interface. The publication workflow below uses those native artifacts.

alire-purifier bundle
alire-purifier publish --tag v0.1.0

The reproducible source archive contains native Alire and GPR metadata. Ordinary Alire can consume it. Publication uploads the exact realized bytes to an existing GitHub release.

Supported scope

The initial integration targets Linux with Alire 2.1.1, GNAT 16.2 and GPRbuild 25. It supports exact Git source origins. Architecture-dependent dependency selection and external system packages need additional integration. The SDK supplies the compiler and build tools. Dependency selection and index changes go through lock updates; ordinary build, run and inspection commands use the prepared solution.

Target systems

  • x86_64-linux
  • aarch64-linux