nix leaf package manager
  • Rust 91.2%
  • Nix 8.2%
  • Shell 0.6%
Find a file
2026-07-22 18:34:53 -04:00
catalog big bang 2026-07-22 14:36:24 -04:00
crates Update Cargo.toml 2026-07-22 18:34:53 -04:00
integration big bang 2026-07-22 14:36:24 -04:00
nix big bang 2026-07-22 14:36:24 -04:00
schemas remove placeholder ids 2026-07-22 18:29:36 -04:00
tests/integration big bang 2026-07-22 14:36:24 -04:00
Cargo.lock big bang 2026-07-22 14:36:24 -04:00
Cargo.toml update license info 2026-07-22 18:26:08 -04:00
flake.nix update license info 2026-07-22 18:26:08 -04:00
LICENSE Create LICENSE 2026-07-22 18:21:43 -04:00
README.md big bang 2026-07-22 14:36:24 -04:00
rust-toolchain.toml big bang 2026-07-22 14:36:24 -04:00

NLPM

NLPM is an experimental package manager for independently updated nixpkgs leaf packages. It keeps a declarative user manifest, realizes each package separately, roots successful generations, and atomically activates one aggregate environment.

The included catalogue currently demonstrates:

  • ripgrep — CLI package (rg)
  • warzone2100 — graphical application
  • fallback-demo — hidden test fixture whose broken unstable candidate falls back to stable GNU Hello

Build

cargo build --workspace

Nix 2.18 or newer with flakes is required at runtime. The repository flake pins independent unstable and stable nixpkgs inputs.

Try it

cargo run -p nlpm-cli -- --catalogue . init
cargo run -p nlpm-cli -- --catalogue . add ripgrep
cargo run -p nlpm-cli -- --catalogue . add fallback-demo
cargo run -p nlpm-cli -- --catalogue . list
cargo run -p nlpm-cli -- --catalogue . status

NLPM uses XDG directories. The aggregate profile is exposed at $XDG_DATA_HOME/nlpm/profile; source integration/shell/nlpm.sh to add it to PATH and XDG_DATA_DIRS.

Use --json with any command for the versioned machine-readable result.

Safety model

  • Candidate builds run one package at a time through structured Nix CLI calls.
  • source = "auto" tries unstable first.
  • If unstable fails, a still-rooted unstable generation newer than stable is retained instead of downgraded.
  • Otherwise stable is attempted, and a prior working generation is retained if both candidates fail.
  • Aggregate activation is an atomic symlink switch; package and environment outputs are independent GC roots.

Run unit tests with cargo test --workspace. tests/integration/smoke.sh performs a real isolated-XDG install/remove cycle for ripgrep and therefore may download Nix store paths.