diff options
| author | Crash Over Burn | 2026-04-14 13:05:33 +0000 |
|---|---|---|
| committer | ยท๐๐ด๐๐๐ฉ๐ค | 2026-04-14 13:05:33 +0000 |
| commit | e6c901d2e5430a3815109b38ced11a4f695f0226 (patch) | |
| tree | 07a4cf8846035d5968f7a78007f71cc1fc6dd6fc /AGENTS.md | |
| parent | 26fef65e28c3f085d33a5d222aa1dbac245ec435 (diff) | |
| download | nixtaml-e6c901d2e5430a3815109b38ced11a4f695f0226.tar nixtaml-e6c901d2e5430a3815109b38ced11a4f695f0226.tar.gz nixtaml-e6c901d2e5430a3815109b38ced11a4f695f0226.tar.bz2 nixtaml-e6c901d2e5430a3815109b38ced11a4f695f0226.tar.lz nixtaml-e6c901d2e5430a3815109b38ced11a4f695f0226.tar.xz nixtaml-e6c901d2e5430a3815109b38ced11a4f695f0226.tar.zst nixtaml-e6c901d2e5430a3815109b38ced11a4f695f0226.zip | |
Port upstream patches: Cmdliner 2.x, lockfile auto-creation, schema upgrade, Fossil VCS
Ported from upstream darcs repository (v1.1.2):
- Cmdliner 2.x compatibility fixes (variable shadowing)
- Lockfile auto-creation when missing
- Schema upgrade command with backup/rollback
- Fossil VCS support (new VCS type)
- Clean up Cmdliner warning for unescaped $PWD
Files modified:
- lib/schema.ml (new): Schema versioning module
- lib/nixtamal.ml: Add upgrade function, Fossil meld support
- lib/error.ml: Add Fossil to prefetch_method, Upgrade error
- lib/input.ml: Add Fossil module, Kind variant
- lib/prefetch.ml: Add Fossil prefetch with SRI hash support
- lib/manifest.ml: Add Fossil codec
- lib/lockfile.ml: Add Fossil lockfile type
- lib/lock_loader.ml: Add Fossil feature flag
- lib/input_foreman.ml: Add Fossil display and prefetch check
- bin/cmd.ml: Cmdliner 2.x fixes, add Upgrade command
- bin/dune, lib/dune, test/dune: Deprecation flags
Builds successfully with all tests passing.
Diffstat (limited to 'AGENTS.md')
| -rw-r--r-- | AGENTS.md | 72 |
1 files changed, 26 insertions, 46 deletions
@@ -1,24 +1,21 @@ # AGENTS.md for nixtamal project -## Project Overview -**Nixtamal** is a Nix version pinning tool designed as an alternative/complement to flakes. It provides sophisticated dependency management with first-class support for Darcs, Pijul, and other VCS systems that flakes don't handle well. +## Documentation -**Strategic Position**: While nixtamal is philosophically an alternative to flakes, toastal is implementing dual support to provide ecosystem bridge capabilities while maintaining the project's core mission. +User-facing documentation is in `README.asciidoc`. Agent notes go in `./llm/`. ## Build/Lint/Test Commands ### Traditional Nix Commands -- Build: `dune build` -- Test all: `dune runtest` +- Build: `nix-build release.nix` or `nix build` +- Test all: `nix-build release.nix -A check` or `dune runtest` - Run single test: `dune runtest --filter <test_name>` (use with alcotest test names) - Format: `dune build @fmt` (ocamlformat) - Clean: `dune clean` -### Nix Integration Commands -- Traditional build: `nix-build` or `nix-build release.nix` -- Development shell: `nix-shell` or `nix-shell shell.nix` -- Flake build (Phase 1+): `nix flake build` or `nix build .#nixtamal` -- Flake shell (Phase 1+): `nix develop` or `nix shell .#devShell` +### Nix Flake Commands +- Build: `nix flake build` or `nix build .#nixtamal` +- Dev shell: `nix develop` or `nix shell .#devShell` ## Code Style Guidelines - **Formatting**: Use ocamlformat (auto-formatted via dune @fmt) @@ -31,47 +28,30 @@ - **Line Length**: No strict limit, but aim for readability - **Pattern Matching**: Exhaustive, use `|` for clarity -## Phase 1: Flake Integration Planning +## Ongoing Integrations -### Week 1 Objectives -1. **Create `flake.nix`** with core outputs wrapping existing `release.nix` -2. **Preserve existing infrastructure** as primary build method -3. **Implement basic flake outputs**: - - `packages.${system}.default` (nixtamal package) - - `packages.${system}.nixtamal` (explicit package name) - - `devShells.${system}.default` (development environment) - - `checks.${system}` (test suite integration) - - `lib` outputs for ecosystem integration +### Nilla Framework (In Progress) -### Week 1 Deliverables -- `flake.nix` with minimal working flake interface -- `flake.lock` generation workflow -- Documentation updates explaining dual approach -- Testing both traditional and flake workflows +Adding first-class support for https://github.com/nilla-nix/nilla[Nilla], a Nix framework with loaders and module system. -### Strategic Constraints -- **Maintain philosophical consistency**: Flakes as interface, not replacement -- **Preserve existing workflows**: No breaking changes to current Nix infrastructure -- **Complement over compete**: Position as bridge between traditional Nix and flake ecosystems +**Status**: Types, codecs, and manifest serialization implemented. Prefetch not yet implemented. + +**Files modified**: +- `lib/input.ml` - Nilla module with Reference type, Kind variant +- `lib/manifest.ml` - KDL codec for Nilla input type +- `lib/error.ml` - Added Nilla to prefetch_method, Not_implemented error +- `lib/prefetch.ml` - Stub returning "not yet implemented" +- `lib/input_foreman.ml` - Display and needs_prefetch logic +- `lib/lock_loader.ml` - Feature constant +- `lib/lockfile.ml` - Lockfile serialization +- `lib/nixtamal.ml` - meld_input_with_lock support + +### Future Integrations +- Additional VCS support as needed +- Migration utilities (flakes, npins, niv) ## Agent Notes - After each major change, create comprehensive notes in `./llm/` folder -- Use the template in `./llm/README.md` +- Use the template in `./llm/README.md` (if present) - Document learnings, challenges, solutions, and insights for future reference - **Flake integration changes** should be specifically documented with strategic reasoning - -## Flake Integration Architecture - -### Design Principles -1. **Wrapper Pattern**: flake.nix imports and wraps existing release.nix infrastructure -2. **Dual Interface**: Both traditional Nix and flakes remain fully functional -3. **Ecosystem Bridge**: Expose nixtamal capabilities to flake users without compromising core mission -4. **Incremental Adoption**: Users can gradually engage with flakes without abandoning nixtamal - -### Key Architectural Decisions -- Keep `nix/tamal/` system as primary input management -- Use flakes only for build/packaging interface layer -- Maintain backward compatibility with existing nixtamal projects -- Provide migration utilities in future phases - -No Cursor or Copilot rules found.
\ No newline at end of file |
