Skip to content

feat: add flake.nix#24

Merged
amemya merged 2 commits into
mainfrom
chore/add-flake-nix
May 28, 2026
Merged

feat: add flake.nix#24
amemya merged 2 commits into
mainfrom
chore/add-flake-nix

Conversation

@amemya
Copy link
Copy Markdown
Owner

@amemya amemya commented May 28, 2026

Nixによる開発環境を整備

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 93a86971-2ada-454d-9514-9c790ab28635

📥 Commits

Reviewing files that changed from the base of the PR and between 49361c9 and 0855999.

⛔ Files ignored due to path filters (1)
  • flake.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • flake.nix

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Nix フレーク設定ファイルを新規追加しました。Go 1.25、Node.js 22、および Wails ツールチェーンを含む統合開発環境の設定が含まれており、Linux を含む複数のプラットフォームに対応しています。

Walkthrough

新規 flake.nix を追加し、system ごとに devShells.default を提供。共通で go_1_25nodejs_22wails を含め、Linux の場合は gtk3webkitgtk_4_0pkg-config を追加。shellHookCGO_ENABLED=1 とバージョン表示を行う。

Changes

Wails Nix 開発環境フレーク

Layer / File(s) Summary
inputs と Linux 依存の宣言
flake.nix
flake.nixinputs/outputs を定義し、eachDefaultSystem で使用する pkgs を取得。Linux 向けに linuxDeps として gtk3webkitgtk_4_0 を設定。
devShells.default の構成
flake.nix
devShells.defaultpkgs.mkShell で構築。buildInputsgo_1_25nodejs_22pkgs-wails.wails と Linux の linuxDeps を追加し、Linux のみ nativeBuildInputspkg-config を含める。shellHookCGO_ENABLED=1 を設定し go/node/wails のバージョンを出力。

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed プルリクエストのタイトル 'feat: add flake.nix' は、変更セットの主要な内容(flake.nix ファイルの新規追加)を明確に要約しており、開発者が変更履歴をスキャンする際に主要な変更内容を理解できます。
Description check ✅ Passed プルリクエストの説明 'Nixによる開発環境を整備' は、変更セットの内容(Nix フレークを使用した開発環境の構築)に関連しており、変更内容の一部を説明しています。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/add-flake-nix

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread flake.nix
Comment on lines +4 to +7
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ee3cb3b5-1fa8-4e6e-b6d6-c0c389f3845e

📥 Commits

Reviewing files that changed from the base of the PR and between 49add29 and 9018183.

📒 Files selected for processing (1)
  • flake.nix

Comment thread flake.nix
Comment thread flake.nix Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 2 changed files in this pull request and generated 4 comments.

Comment thread flake.nix
# 開発に必要なパッケージ群
# macOS: Cocoa/WebKit等のフレームワークはデフォルトSDKに含まれるため明示不要
buildInputs = with pkgs; [
go_1_25 # バックエンド用 (go.mod は go 1.23 だが後方互換)
Comment thread flake.nix
# macOS: Cocoa/WebKit等のフレームワークはデフォルトSDKに含まれるため明示不要
buildInputs = with pkgs; [
go_1_25 # バックエンド用 (go.mod は go 1.23 だが後方互換)
nodejs_22 # フロントエンド用 (LTS)
Comment thread flake.nix
Comment on lines +24 to +26
nativeBuildInputs = with pkgs; lib.optionals stdenv.isLinux [
pkg-config
];
Comment thread flake.nix
Comment on lines +31 to +34
go_1_25 # バックエンド用 (go.mod は go 1.23 だが後方互換)
nodejs_22 # フロントエンド用 (LTS)
wails # Wails CLIツール本体
] ++ linuxDeps;
@amemya
Copy link
Copy Markdown
Owner Author

amemya commented May 28, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@amemya
Copy link
Copy Markdown
Owner Author

amemya commented May 28, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
flake.nix (1)

30-34: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Wails CLI のバージョンを v2.10.2 に明示固定してください。

go.modgo.mod Line 9)では github.com/wailsapp/wails/v2 v2.10.2 を使っていますが、ここは pkgs.wails の追従版になっており、CLI 挙動がずれるリスクがあります。overlay などで wailsv2.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

📥 Commits

Reviewing files that changed from the base of the PR and between 9018183 and 49361c9.

⛔ Files ignored due to path filters (1)
  • flake.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • flake.nix

@amemya
Copy link
Copy Markdown
Owner Author

amemya commented May 28, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@amemya amemya merged commit 7f08fef into main May 28, 2026
1 check passed
@amemya amemya deleted the chore/add-flake-nix branch May 28, 2026 09:55
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.

2 participants