feat: add flake.nix#24
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
Walkthrough新規 ChangesWails Nix 開発環境フレーク
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Nix Flakes を使って ExifFrame(Wails v2 + Go + Node)の開発環境を統一し、OS別依存(Linux/macOS)を含む devShell を提供するPRです。
Changes:
flake.nixを追加し、nixos-unstable+flake-utilsベースの devShell を定義- Go 1.23 / Node.js 20 / Wails CLI と、Linux(macOS)向けの追加依存を同梱
- shellHook で CGO 有効化とバージョン表示を実施
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| inputs = { | ||
| nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | ||
| flake-utils.url = "github:numtide/flake-utils"; | ||
| }; |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@flake.nix`:
- Around line 4-7: このリポジトリの inputs (例: nixpkgs.url =
"github:NixOS/nixpkgs/nixos-unstable") は flake.lock
を同梱していないため再現性が担保されていません。ローカルで flake.lock を生成(例: run `nix flake lock`)し、生成された
flake.lock をリポジトリに追加して同じPRでコミットしてください。また .gitignore に flake.lock
が除外されていないことを確認し、コミット後に CI/ローカルで flake.lock が用いられて依存が固定されることを検証してください。
- Around line 35-39: The flake currently adds pkgs.wails to buildInputs without
pinning its version; change flake.nix so the Wails CLI used by buildInputs (the
symbol "wails" referenced alongside buildInputs, linuxDeps and darwinDeps) is
pinned to v2.10.2 — for example add an overlay or a pinned package derived from
pkgs.fetchFromGitHub (github.com/wailsapp/wails v2.10.2) or use a pinned nixpkgs
input so that "wails" resolves to the v2.10.2 artifact; update the "wails"
reference in buildInputs to that pinned package to ensure `wails build` behavior
matches go.mod and release.yml.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
9018183 to
49361c9
Compare
| # 開発に必要なパッケージ群 | ||
| # macOS: Cocoa/WebKit等のフレームワークはデフォルトSDKに含まれるため明示不要 | ||
| buildInputs = with pkgs; [ | ||
| go_1_25 # バックエンド用 (go.mod は go 1.23 だが後方互換) |
| # macOS: Cocoa/WebKit等のフレームワークはデフォルトSDKに含まれるため明示不要 | ||
| buildInputs = with pkgs; [ | ||
| go_1_25 # バックエンド用 (go.mod は go 1.23 だが後方互換) | ||
| nodejs_22 # フロントエンド用 (LTS) |
| nativeBuildInputs = with pkgs; lib.optionals stdenv.isLinux [ | ||
| pkg-config | ||
| ]; |
| go_1_25 # バックエンド用 (go.mod は go 1.23 だが後方互換) | ||
| nodejs_22 # フロントエンド用 (LTS) | ||
| wails # Wails CLIツール本体 | ||
| ] ++ linuxDeps; |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
♻️ Duplicate comments (1)
flake.nix (1)
30-34:⚠️ Potential issue | 🟠 Major | ⚡ Quick winWails CLI のバージョンを
v2.10.2に明示固定してください。
go.mod(go.modLine 9)ではgithub.com/wailsapp/wails/v2 v2.10.2を使っていますが、ここはpkgs.wailsの追従版になっており、CLI 挙動がずれるリスクがあります。overlayなどでwailsをv2.10.2相当に固定してください。#!/bin/bash set -euo pipefail echo "== Wails version contract in repo ==" rg -n 'github.com/wailsapp/wails/v2 v[0-9]+\.[0-9]+\.[0-9]+' go.mod .github/workflows/release.yml echo "== Wails declaration in flake.nix ==" rg -nP '^\s*wails\b|Wails version' flake.nix echo "== Check whether pinned derivation/overlay exists in flake.nix ==" rg -n 'overlay|overlays|fetchFromGitHub|rev\s*=|wails.*2\.10\.2' flake.nix || true🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@flake.nix` around lines 30 - 34, The flake currently pulls pkgs.wails unpinned in the buildInputs list (see buildInputs and wails), causing a mismatch with go.mod's github.com/wailsapp/wails/v2 v2.10.2; add an overlay that fetches the wails v2.10.2 derivation (use fetchFromGitHub with the v2.10.2 rev and sha256) and override pkgs.wails with that pinned derivation, then update the buildInputs entry to use the overlay-provided wails; ensure the overlay is added to overlays (or overlay) in the flake so wails is fixed to v2.10.2 rather than tracking the distribution package.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Duplicate comments:
In `@flake.nix`:
- Around line 30-34: The flake currently pulls pkgs.wails unpinned in the
buildInputs list (see buildInputs and wails), causing a mismatch with go.mod's
github.com/wailsapp/wails/v2 v2.10.2; add an overlay that fetches the wails
v2.10.2 derivation (use fetchFromGitHub with the v2.10.2 rev and sha256) and
override pkgs.wails with that pinned derivation, then update the buildInputs
entry to use the overlay-provided wails; ensure the overlay is added to overlays
(or overlay) in the flake so wails is fixed to v2.10.2 rather than tracking the
distribution package.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: bc3217dd-7846-4c1b-8ccf-0ae1c2b07a30
⛔ Files ignored due to path filters (1)
flake.lockis excluded by!**/*.lock
📒 Files selected for processing (1)
flake.nix
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Nixによる開発環境を整備