tatara_pkgs/lib.rs
1//! # tatara-pkgs — nixpkgs, fully expressed in tatara-lisp
2//!
3//! Two things live together:
4//!
5//! 1. **`PackageSet` trait** — backend-agnostic view of a package universe.
6//! Every backend (nixpkgs bridge, tatara-lisp-authored set, overlay of
7//! either) answers `get(name) -> Option<Derivation>` + `names() ->
8//! Vec<String>`.
9//!
10//! 2. **Synthesizer** — a `MultiSynthesizer` that walks a `PackageSet` and
11//! emits one tatara-lisp `.tl` file per package. `tend` drives this: on a
12//! nixpkgs commit bump, the generator regenerates the mirror tree; each
13//! package becomes a typed `(defderivation …)` that realizes to the same
14//! `/nix/store/...` path nixpkgs would produce.
15//!
16//! ```text
17//! nixpkgs ──tend sync──► PackageSet (NixpkgsBridge)
18//! │
19//! ▼ MultiSynthesizer::generate_all
20//! Vec<Artifact> (`hello.tl`, `bash.tl`, …)
21//! │
22//! ▼ disk
23//! pleme-io/nixpkgs-tl/
24//! │
25//! ▼ tatara-eval + tatara-nix::Realizer
26//! /nix/store/<hash>-<name> (same path nixpkgs builds)
27//! ```
28//!
29//! The gradient: today a tatara-lisp file is a bridge wrapper; tomorrow the
30//! hot-path packages (stdenv, coreutils, bash, kernel) transliterate to pure
31//! tatara-lisp and stop bridging. The typed surface doesn't change.
32
33pub mod bridge;
34pub mod generator;
35pub mod overlay;
36pub mod set;
37
38pub use bridge::NixpkgsBridge;
39pub use generator::{NixpkgsMirror, NixpkgsMirrorError};
40pub use overlay::OverlayPackageSet;
41pub use set::{PackageLookup, PackageSet, PackageSetError};