M2: a build.zig step makes installer packages #17

Closed
opened 2026-10-14 09:27:58 -05:00 by jeff · 1 comment
Owner

What to build

A Zig project with zixl as a dependency makes an installer package as part of its own zig build: zixl.addInstallerPackage(b, .{ ... }) takes WiX sources, an architecture, preprocessor variables (text, or a file or directory the build makes or holds), include directories and an optional timestamp, and gives back the package and the directory holding it with any external cabinets, as LazyPaths.

The package is made again when a WiX source, an included file, a file a source path names, or a define changes, and not otherwise.

Acceptance criteria

  • addInstallerPackage is usable from a project that depends on zixl, whatever that project is being built for.
  • A program the project builds reaches the package through a variable used as a Source.
  • The step is cached when nothing has changed, and runs again when an included file or the program changes.
  • External cabinets land beside the package, and nothing else does.
  • A check in nix flake check covers all of the above from a project under tests/build.
## What to build A Zig project with zixl as a dependency makes an installer package as part of its own `zig build`: `zixl.addInstallerPackage(b, .{ ... })` takes WiX sources, an architecture, preprocessor variables (text, or a file or directory the build makes or holds), include directories and an optional timestamp, and gives back the package and the directory holding it with any external cabinets, as `LazyPath`s. The package is made again when a WiX source, an included file, a file a source path names, or a define changes, and not otherwise. ## Acceptance criteria - [ ] `addInstallerPackage` is usable from a project that depends on zixl, whatever that project is being built for. - [ ] A program the project builds reaches the package through a variable used as a `Source`. - [ ] The step is cached when nothing has changed, and runs again when an included file or the program changes. - [ ] External cabinets land beside the package, and nothing else does. - [ ] A check in `nix flake check` covers all of the above from a project under `tests/build`.
Author
Owner

Done in d69c8ab. zixl.addInstallerPackage builds zixl for the build machine and runs it. zixl --depfile tells Zig's cache what each package was made from, so an included file or a source path changing makes the package again. The build-step check in nix flake check covers it from tests/build: a Windows program built and packaged in one zig build, the step cached when nothing changed, and made again when an include or the program changes. CI run 14 is green. ADR-0005 records why the step runs the program rather than the library.

Done in d69c8ab. `zixl.addInstallerPackage` builds zixl for the build machine and runs it. `zixl --depfile` tells Zig's cache what each package was made from, so an included file or a source path changing makes the package again. The `build-step` check in `nix flake check` covers it from `tests/build`: a Windows program built and packaged in one `zig build`, the step cached when nothing changed, and made again when an include or the program changes. CI run 14 is green. ADR-0005 records why the step runs the program rather than the library.
jeff closed this issue 2026-10-14 09:47:26 -05:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jeff/zixl#17
No description provided.