feat: Add dolt package at 2.2.0 #17

Merged
martin merged 3 commits from pkgs/dolt/init into main 2026-10-03 18:58:42 +00:00
Owner
No description provided.
martin self-assigned this 2026-10-03 18:46:06 +00:00
feat: Add dolt package at 2.2.0
All checks were successful
ci/woodpecker/pr/verify-nix Pipeline was successful
ci/woodpecker/pr/pr-review Pipeline was successful
aea931fed6
Member

Review Summary

Static review (no nix/shell available in this environment to run nix flake check or nix build .#dolt).

Verified as correct:

  • pkgs/dolt.nix matches the repo's package convention (flake-agnostic import ./pkgs/x.nix { ... } like openapi-to-rust.nix), the x86_64-linux/aarch64-linux sets cover exactly lib/system.nix's supportedSystems, and meta.platforms is derived from the same hash set, so every flake output evaluates.
  • Fetch is SRI-hashed and the URL is built only from literal attrsets (no injection surface); installPhase correctly wraps runHook preInstall/postInstall, mainProgram and the asl20 licence are right, and installCheckPhase forces a writable HOME.
  • flake wiring is sound: packages is now an attrset with both outputs, and dolt is bound once in the systemOutputs let-block so it's reused by packages and devShells.
  • The README beads.override snippet is valid — nixpkgs beads takes dolt as a callPackage argument.
  • Table reformatting in README/AGENTS.md is consistent with canonical nix fmt/mdformat output (padded rows line up with the longest pre-existing rows, which are unchanged).

On the findings already in the thread: I agree they're all non-blocking and worth doing — heading hierarchy in README, runHook pre/postInstallCheck, adding dolt to checks so CI exercises the pinned hashes and version assertion, and the ~42 MB dev-shell growth. Two small additions below, plus a doc-drift nit.

No correctness, security, or performance blockers.


*🤖 Review by opencode (opencode/mimo-v2.6-flash-free) — verdict: approve

# Review Summary Static review (no nix/shell available in this environment to run `nix flake check` or `nix build .#dolt`). **Verified as correct:** - `pkgs/dolt.nix` matches the repo's package convention (flake-agnostic `import ./pkgs/x.nix { ... }` like `openapi-to-rust.nix`), the `x86_64-linux`/`aarch64-linux` sets cover exactly `lib/system.nix`'s `supportedSystems`, and `meta.platforms` is derived from the same hash set, so every flake output evaluates. - Fetch is SRI-hashed and the URL is built only from literal attrsets (no injection surface); `installPhase` correctly wraps `runHook preInstall`/`postInstall`, `mainProgram` and the `asl20` licence are right, and `installCheckPhase` forces a writable `HOME`. - flake wiring is sound: `packages` is now an attrset with both outputs, and `dolt` is bound once in the `systemOutputs` let-block so it's reused by `packages` and `devShells`. - The README `beads.override` snippet is valid — nixpkgs `beads` takes `dolt` as a `callPackage` argument. - Table reformatting in README/AGENTS.md is consistent with canonical `nix fmt`/mdformat output (padded rows line up with the longest pre-existing rows, which are unchanged). **On the findings already in the thread:** I agree they're all non-blocking and worth doing — heading hierarchy in README, `runHook pre/postInstallCheck`, adding dolt to `checks` so CI exercises the pinned hashes and version assertion, and the ~42 MB dev-shell growth. Two small additions below, plus a doc-drift nit. No correctness, security, or performance blockers. --- *🤖 Review by opencode (opencode/mimo-v2.6-flash-free) — verdict: **approve** <!-- forgejo-opencode-review -->
clank-bot left a comment

Code review findings from opencode.

Code review findings from opencode. <!-- forgejo-opencode-review -->
@ -6,6 +6,18 @@ Reusable Nix library functions, exposed through the flake's `lib` output.
All attributes are exposed under the flake's `lib` output and consumed as `my.lib.*`.
## Packages
Member
[style] Inserting `## Packages` between `## Modules` and its `### my.lib.domain`/`### my.lib.defaults` subsections re-parents all of the `my.lib.*` documentation under "Packages". Move this section below the module subsections (e.g. just before `## Usage`), or give it a `###`-level slot so the heading hierarchy stays correct. While here: `packages.openapi-to-rust` is also a flake package output but isn't mentioned under this new section.
<!-- forgejo-opencode-review --> [style] Inserting `## Packages` between `## Modules` and its `### my.lib.domain`/`### my.lib.defaults` subsections re-parents all of the `my.lib.*` documentation under "Packages". Move this section below the module subsections (e.g. just before `## Usage`), or give it a `###`-level slot so the heading hierarchy stays correct. While here: `packages.openapi-to-rust` is also a flake package output but isn't mentioned under this new section.
Member
[performance] Adding `dolt` to `devShells.default` grows the shell closure by a ~42 MB prebuilt binary for every `nix develop`, but nothing in this repo (lib, unit tests, `test/hello`) consumes it — its documented purpose is overriding `beads` in downstream flakes. If it isn't needed interactively, drop it from the shell and keep it as a `packages` output only.
<!-- forgejo-opencode-review --> [performance] Adding `dolt` to `devShells.default` grows the shell closure by a ~42 MB prebuilt binary for every `nix develop`, but nothing in this repo (lib, unit tests, `test/hello`) consumes it — its documented purpose is overriding `beads` in downstream flakes. If it isn't needed interactively, drop it from the shell and keep it as a `packages` output only.
Member
[style] `checks` still only contains formatting + lib/test checks, so `nix flake check` (and CI) never builds `dolt`: a wrong arch hash, a changed `sourceRoot`, or a failed version assertion would only surface when someone manually runs `nix build .#dolt`. Consider adding `dolt = dolt;` (or a thin `runCommand` wrapper) to the `checks` set so the package is exercised like `rust-build` is.
<!-- forgejo-opencode-review --> [style] `checks` still only contains formatting + lib/test checks, so `nix flake check` (and CI) never builds `dolt`: a wrong arch hash, a changed `sourceRoot`, or a failed version assertion would only surface when someone manually runs `nix build .#dolt`. Consider adding `dolt = dolt;` (or a thin `runCommand` wrapper) to the `checks` set so the package is exercised like `rust-build` is.
@ -0,0 +30,4 @@
'';
doInstallCheck = true;
installCheckPhase = ''
Member
[style] Overriding `installCheckPhase` wholesale bypasses the `runHook preInstallCheck` / `runHook postInstallCheck` contract, so any future hooks attached to that phase silently never run. The `installPhase` above does this correctly; mirror it here:
installCheckPhase = ''
  runHook preInstallCheck
  export HOME="$TMPDIR"
  "$out/bin/dolt" version | grep -F "${version}"
  runHook postInstallCheck
'';
<!-- forgejo-opencode-review --> [style] Overriding `installCheckPhase` wholesale bypasses the `runHook preInstallCheck` / `runHook postInstallCheck` contract, so any future hooks attached to that phase silently never run. The `installPhase` above does this correctly; mirror it here: ```nix installCheckPhase = '' runHook preInstallCheck export HOME="$TMPDIR" "$out/bin/dolt" version | grep -F "${version}" runHook postInstallCheck ''; ```
docs: Remove version from docs
Some checks failed
ci/woodpecker/pr/verify-nix Pipeline failed
ci/woodpecker/pr/pr-review Pipeline was successful
04032182c0
clank-bot left a comment

Code review findings from opencode.

Code review findings from opencode. <!-- forgejo-opencode-review -->
@ -30,2 +31,3 @@
| Check all | `nix flake check` (formatting + rust shape/build checks) |
| Unit tests | `just unit` or `nix run nixpkgs#nix-unit -- --impure --extra-experimental-features flakes --flake ".#unitTests"` |
| Dev shell | `nix develop` (provides `just`) |
| Dev shell | `nix develop` (provides `just`) |
Member
[style] This row still says the dev shell "provides `just`", but the PR adds `dolt` to `devShells.default`. Update the row (or drop dolt from the shell per the performance note above) so the doc matches reality.
<!-- forgejo-opencode-review --> [style] This row still says the dev shell "provides `just`", but the PR adds `dolt` to `devShells.default`. Update the row (or drop dolt from the shell per the performance note above) so the doc matches reality.
@ -9,0 +14,4 @@
```nix
beads = pkgs.beads.override {
dolt = my-nix-lib.packages.${system}.dolt;
Member
[style] The rest of this README accesses the flake through the `my = my-nix-lib` alias introduced in `## Usage`, so prefer `my.packages.${system}.dolt` here for consistency. (The snippet also leaves `pkgs` and `system` unbound — a one-line `# in: flake outputs, per system` note or binding them would make it copy-pasteable.)
<!-- forgejo-opencode-review --> [style] The rest of this README accesses the flake through the `my = my-nix-lib` alias introduced in `## Usage`, so prefer `my.packages.${system}.dolt` here for consistency. (The snippet also leaves `pkgs` and `system` unbound — a one-line `# in: flake outputs, per system` note or binding them would make it copy-pasteable.)
@ -0,0 +1,45 @@
{ pkgs }:
let
version = "2.2.0";
hashes = {
Member
[style] `hashes` and `architecture` are two parallel per-system attrsets that must be edited in lockstep; adding a system to one without the other yields an obscure `attribute missing` error only at build time. Consider a single attrset per system, e.g. `platforms = { x86_64-linux = { arch = "amd64"; hash = "sha256-..."; }; ... };` and derive `url`/`sourceRoot`/`meta.platforms` from it.
<!-- forgejo-opencode-review --> [style] `hashes` and `architecture` are two parallel per-system attrsets that must be edited in lockstep; adding a system to one without the other yields an obscure `attribute missing` error only at build time. Consider a single attrset per system, e.g. `platforms = { x86_64-linux = { arch = "amd64"; hash = "sha256-..."; }; ... };` and derive `url`/`sourceRoot`/`meta.platforms` from it.
chore: Format mds
Some checks failed
ci/woodpecker/pr/verify-nix Pipeline was successful
ci/woodpecker/pr/pr-review Pipeline was canceled
4460a8a895
martin merged commit 5a20e19930 into main 2026-10-03 18:58:42 +00:00
martin deleted branch pkgs/dolt/init 2026-10-03 18:58:42 +00:00
martin referenced this pull request from a commit 2026-10-03 18:58:43 +00:00
Sign in to join this conversation.
No description provided.