blob: f99cdbfe6687c441697d2c187525e6a40d2eb93a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
|
================================================================================
Nixtamal Project Documentation
================================================================================
.. role:: ab
.. role:: ac
A Nix version pinning tool with first-class support for diverse version control
systems and modern dependency management.
------------------------------------------------------------------------------
Overview
------------------------------------------------------------------------------
Nixtamal is an OCaml-based tool that addresses the limitations of Nix flakes
while maintaining compatibility with traditional Nix workflows. It provides
deterministic dependency pinning through lockfiles while supporting a diverse
ecosystem of version control systems.
**Key Capabilities:**
• Multi-VCS support: Git, Darcs, Pijul, Fossil, and archives/files
• KDL-based declarative configuration
• Concurrent locking with domain-based parallelism
• Schema versioning with upgrade paths
• Template/Jinja2 support for dynamic URLs
• Mirror support for resilience
• Dual workflow: Traditional Nix + Flake compatibility
**Website:** https://nixtamal.tech
**Community:** xmpp:nixtamal@chat.toastal.in.th?join
------------------------------------------------------------------------------
Quick Links
------------------------------------------------------------------------------
.. toctree::
:maxdepth: 2
philosophy
manifest
roadmap
history
------------------------------------------------------------------------------
Current State (Phase 2)
------------------------------------------------------------------------------
**Version:** 0.2.0 (Schema Version)
**Implemented Features:**
✅ **Core Functionality**
- Manifest parsing and validation (KDL)
- Lockfile generation and management (JSON)
- Concurrent prefetching with Eio
- All major VCS types supported
✅ **Schema Management**
- Versioned schemas (0.1.1 → 0.2.0)
- ``nixtamal upgrade`` command
- Automatic backup and rollback
✅ **VCS Support**
- Git (with submodules, LFS)
- Darcs (with context/tag references)
- Pijul (channels, states, changes)
- Fossil (branches, tags, checkins)
- Nilla framework integration
- Files and archives
✅ **Build System**
- Traditional Nix (default.nix, shell.nix)
- Flake support (flake.nix)
- Hybrid workflows
✅ **Quality Assurance**
- Comprehensive test suite with coverage (36.87%)
- Property-based testing (QCheck)
- CI/CD integration
**In Development:**
🔄 **Phase 2.5** (Current Focus)
- Documentation website (nixtamal.tech)
- Test coverage expansion
- Visual dependency graphs
------------------------------------------------------------------------------
Installation
------------------------------------------------------------------------------
**Via Nix Flake:**
.. code:: bash
nix run github:toastal/nixtamal -- --help
**Via Traditional Nix:**
.. code:: bash
nix-build release.nix
./result/bin/nixtamal --help
**Development Shell:**
.. code:: bash
nix develop
dune build
dune runtest
------------------------------------------------------------------------------
Basic Usage
------------------------------------------------------------------------------
**Initialize a project:**
.. code:: bash
nixtamal set-up
**Lock dependencies:**
.. code:: bash
nixtamal lock
**Refresh to latest versions:**
.. code:: bash
nixtamal refresh
**Upgrade schema:**
.. code:: bash
nixtamal upgrade --dry-run # Preview changes
nixtamal upgrade # Apply upgrade
**Check for stale dependencies:**
.. code:: bash
nixtamal list-stale
------------------------------------------------------------------------------
Architecture
------------------------------------------------------------------------------
**Core Modules:**
``lib/input.ml``
Input type definitions for all supported VCS and file types
``lib/manifest.ml``
KDL parsing and validation for manifest.kdl
``lib/lockfile.ml``
Lockfile serialization and deserialization
``lib/prefetch.ml``
VCS-specific prefetch implementations
``lib/nixtamal.ml``
Core orchestration and workflow logic
``lib/schema.ml``
Schema versioning and upgrade logic
``lib/input_foreman.ml``
Concurrent input management and locking
``bin/cmd.ml``
CLI command definitions and interface
------------------------------------------------------------------------------
Philosophy & Design Principles
------------------------------------------------------------------------------
See :doc:`philosophy` for detailed discussion of:
• Why KDL over JSON/YAML
• First-class VCS diversity
• The anti-corporate stance
• Privacy and decentralization
• Dual workflow philosophy
------------------------------------------------------------------------------
Development Roadmap
------------------------------------------------------------------------------
See :doc:`roadmap` for complete phased development plan:
• **Phase 1** ✅ Foundation (Completed)
• **Phase 2** ✅ Core Features (Completed)
• **Phase 2.5** 🔄 Website & Documentation (Current)
• **Phase 3** 📊 Visual Dependency Graphs (Next)
• **Phase 4** 🔮 Future Enhancements
------------------------------------------------------------------------------
Development History
------------------------------------------------------------------------------
See :doc:`history` for complete project timeline:
• Origins as a community fork
• Transition from Darcs to Git
• Flake integration development
• Nilla framework support
• Upstream porting effort (2026-04-14)
------------------------------------------------------------------------------
Contributing
------------------------------------------------------------------------------
**Code Style:**
- Tabs for OCaml, spaces for Nix/dune (per .editorconfig)
- OCamlFormat for formatting
- SPDX headers required
- Prefer Result over exceptions
**Communication:**
- Website: https://nixtamal.tech
- XMPP MUC: xmpp:nixtamal@chat.toastal.in.th?join
**License:**
GPL-3.0-or-later (tools) / LGPL-2.1-or-later (libraries)
------------------------------------------------------------------------------
.. vim: set textwidth=80
|