Skip to content

build: add zizmor and cargo-dist to the dev shell - #171

Merged
furedea merged 2 commits into
mainfrom
build/add-zizmor-and-dist-to-devshell
Oct 21, 2026
Merged

furedea merged 2 commits into
mainfrom
build/add-zizmor-and-dist-to-devshell

Conversation

@furedea-agent

@furedea-agent furedea-agent Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

概要

flake の devShell に zizmor と cargo-dist(実行名 dist)を追加する.これまでエージェントは nix shell nixpkgs#zizmor などを都度実行し,そのたびに承認が必要だった.

変更内容

  • flake.nix の devShell packages に zizmor と cargo-dist を追加
  • nixpkgs の cargo-dist は 0.31.0 だが,Cargo.toml と release_artifacts.yml は 0.30.2 に固定されており,dist plan がバージョン不一致で終了コード 255 になる.そのため overrideAttrs で devShell の cargo-dist を 0.30.2 に固定した(src と cargoHash は実ビルドで算出)

方針の選択理由

プロジェクト側を 0.31.0 へ上げる案もあったが,release_artifacts.yml が CARGO_DIST_VERSION: 0.30.2 を直書きしており,tests/release_distribution.rs が Cargo.toml と workflow の一致を検証している.workflow の変更が必須になる(エージェントの App は push できない)ため,workflow に触れない Nix override を採用した.

検証

  • nix develop -c zizmor --version → zizmor 1.31.0
  • nix develop -c dist --version → cargo-dist 0.30.2
  • nix develop -c dist plan --output-format=json → 終了コード 0
  • nix develop -c cargo test --test release_distribution → 3 passed
  • nix flake check → all checks passed
  • statix / deadnix / nixfmt → 問題なし

備考

cargo-dist を更新するときは Cargo.toml,release_artifacts.yml,flake.nix の override の 3 か所を合わせる必要がある.devShell 外で両ツールを実行している箇所:

  • .github/workflows/gha_lint.yml: zizmorcore/zizmor-action(本体は既定の latest)
  • .github/workflows/release_artifacts.yml: cargo-dist を個別にインストールして実行
  • .github/workflows/release_please.yml: 上記を間接的に起動

lefthook は両ツールを実行していない.

Refs furedea/dotfiles#264

🤖 Generated with Claude Code

furedea and others added 2 commits October 21, 2026 19:37
Agents ran these through nix shell, which needed approval every time.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
nixpkgs ships 0.31.0, but Cargo.toml and the release workflow pin 0.30.2,
so dist plan exited 255 on the version mismatch.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@furedea
furedea merged commit 3a6ae22 into main Oct 21, 2026
11 checks passed
@furedea
furedea deleted the build/add-zizmor-and-dist-to-devshell branch October 21, 2026 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant