Skip to content

feat: add flake.nix for Nix-based installation#55

Merged
harumiWeb merged 3 commits intoharumiWeb:mainfrom
shunsock:feat/nix-install
Apr 14, 2026
Merged

feat: add flake.nix for Nix-based installation#55
harumiWeb merged 3 commits intoharumiWeb:mainfrom
shunsock:feat/nix-install

Conversation

@shunsock
Copy link
Copy Markdown
Contributor

@shunsock shunsock commented Apr 14, 2026

Hi! Thank you for maintaining eitango 🙏

This PR adds a flake.nix so that eitango can be installed and run via the Nix package manager.

Summary

  • Add flake.nix with buildGoModule package definition for eitango
  • Enable installation via nix profile install github:harumiWeb/eitango or one-off execution via nix run github:harumiWeb/eitango
  • Include a devShell with Go, gopls, and golangci-lint for contributors

Usage

# Install
nix profile install github:harumiWeb/eitango

# Run without installing
nix run github:harumiWeb/eitango

# Enter dev environment
nix develop github:harumiWeb/eitango

Test plan

  • nix build .#eitango succeeds
  • ./result/bin/eitango version outputs correct version info
  • nix flake check passes

Please let me know if there's anything you'd like me to adjust. Happy to iterate on this!

🤖 Generated with Claude Code


Open with Devin

Summary by CodeRabbit

  • Chores
    • Added Nix flake configuration to improve build and distribution across multiple systems, including enhanced development environment setup with Go tooling.

Enable installing eitango via `nix profile install` or `nix run`,
and provide a devShell with Go toolchain for contributors.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 14, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 77c7c73f-1f3c-4993-a029-6745265aaa79

📥 Commits

Reviewing files that changed from the base of the PR and between 87e99f3 and 676240e.

📒 Files selected for processing (1)
  • flake.nix
✅ Files skipped from review due to trivial changes (1)
  • flake.nix

📝 Walkthrough

Walkthrough

Adds a new flake.nix Nix flake that builds and packages the eitango Go CLI per default Nix systems, embeds version/commit/date metadata into the binary, pins vendor dependencies, and provides a developer shell with Go tooling.

Changes

Cohort / File(s) Summary
Nix Flake Configuration
flake.nix
Adds a Nix flake using nixpkgs and flake-utils, generates per-system packages.eitango via pkgs.buildGoModule (CGO disabled, cmd/eitango only), embeds main.version/main.commit/main.date via ldflags, pins vendor deps with vendorHash, exposes packages.default and devShells.default (includes go, gopls, golangci-lint).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐇
A flake I stitched with tiny paws,
Go bits bundled without a cause,
Version tucked into every byte,
Dev tools ready, build delight —
Hop, compile, and sleep tonight.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately describes the main change: adding a flake.nix file to enable Nix-based installation of the eitango Go CLI.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@codacy-production
Copy link
Copy Markdown

codacy-production bot commented Apr 14, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

coderabbitai[bot]

This comment was marked as resolved.

Address CodeRabbit review: replace hardcoded epoch timestamp with
self.lastModifiedDate so `eitango version` shows a meaningful date.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@shunsock
Copy link
Copy Markdown
Contributor Author

Thanks for the review, @coderabbitai!

Build date (line 39): Good catch! Fixed in 07e33bc — now using self.lastModifiedDate so eitango version shows a meaningful build date.

Homepage (line 44): This is intentional. harumiWeb/eitango is the upstream repository where this PR is submitted, and the Go module path is github.com/harumiWeb/eitango. The homepage should point to the canonical upstream location, not the fork.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 14, 2026

Tip

For best results, initiate chat on the files or code changes.

@shunsock: Thanks for the update!

  • Build date: The fix using self.lastModifiedDate looks great — that will give a meaningful, reproducible timestamp for eitango version.
  • Homepage: Understood, that makes perfect sense. Since the PR targets harumiWeb/eitango as the upstream and the Go module path is github.com/harumiWeb/eitango, pointing the homepage there is the correct canonical choice. My concern was misplaced — apologies for the noise!

✏️ Learnings added
Learnt from: shunsock
URL: https://github.com/harumiWeb/eitango/pull/55

Timestamp: 2026-04-14T15:54:31.010Z
Learning: In the `flake.nix` of the `eitango` project (Go CLI, repository `harumiWeb/eitango`), the `meta.homepage` is intentionally set to `https://github.com/harumiWeb/eitango` (the upstream/canonical repo) rather than any fork. The Go module path is also `github.com/harumiWeb/eitango`. Do not flag this as incorrect in future reviews.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!

This comment was marked as resolved.

Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@harumiWeb
Copy link
Copy Markdown
Owner

@shunsock コントリビューションありがとうございます!
Nix flakeまだ使いこなせてないので非常に参考になります🙏
マージします。

@harumiWeb harumiWeb merged commit 0dbd125 into harumiWeb:main Apr 14, 2026
9 checks passed
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.

3 participants