Skip to content

fix: nix flake build test failure#10243

Merged
jdx merged 1 commit into
jdx:mainfrom
okuuva:push-lswskrlltkvt
Jun 5, 2026
Merged

fix: nix flake build test failure#10243
jdx merged 1 commit into
jdx:mainfrom
okuuva:push-lswskrlltkvt

Conversation

@okuuva

@okuuva okuuva commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Adding the git::tests::clone_by_sha_does_not_panic broke nix flake builds as git was not available during tests. Adding it to nativeCheckInputs fixes the issue.

Summary by CodeRabbit

  • Chores
    • Updated build configuration to include Git in the test environment to support validation during the build process.

Adding the `git::tests::clone_by_sha_does_not_panic` broke nix flake
builds as `git` was not available during tests. Adding it to
`nativeCheckInputs` fixes the issue.
@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Linter diff in the way? Review this PR in Change Stack to focus on meaningful changes and expand context only when needed.

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b1f38da7-2b40-483f-9746-a22e7c2f5f1c

📥 Commits

Reviewing files that changed from the base of the PR and between ebf4795 and 309c125.

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

📝 Walkthrough

Walkthrough

The default.nix Nix package definition is updated to include git in the nativeCheckInputs attribute of the Rust package build configuration. This ensures that git is available during the build and test phases for checks that require it.

Changes

Build Configuration

Layer / File(s) Summary
Git native check input
default.nix
nativeCheckInputs attribute is added to rustPlatform.buildRustPackage with git populated, allowing test and build checks that depend on git to execute successfully.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

A rabbit hops through default.nix with glee, 🐰
Adding git to inputs, so tests run free,
Three lines of code, so simple and clean,
The best little change you ever have seen! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'fix: nix flake build test failure' directly addresses the main change: adding git to nativeCheckInputs to resolve a Nix build test failure. The title clearly summarizes the primary intent.
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

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

@greptile-apps

greptile-apps Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes a Nix flake build test failure by adding git to nativeCheckInputs in default.nix, making it available on the host platform during the checkPhase. The git in buildInputs covers the runtime dependency of mise itself (target-platform), but does not guarantee git is on PATH as a native tool when running tests, particularly in cross-compilation scenarios.

  • Adds a minimal nativeCheckInputs block with git, which is the correct Nix mechanism for host-side test dependencies.
  • git intentionally appears in both nativeCheckInputs (for testing) and buildInputs (as a runtime dep of the tool itself); this duplication is expected and correct in Nix.

Confidence Score: 5/5

Single-line addition to a Nix build file; no logic changes, no runtime behavior affected.

The change is a targeted, well-understood Nix convention fix — adding git to nativeCheckInputs so the test suite can invoke it on the host during the check phase. The rest of default.nix is unchanged.

No files require special attention.

Important Files Changed

Filename Overview
default.nix Adds git to nativeCheckInputs so it is available on the host during the Nix check phase, fixing the git::tests::clone_by_sha_does_not_panic test failure in flake builds.

Reviews (1): Last reviewed commit: "fix: nix flake build test failure" | Re-trigger Greptile

@okuuva

okuuva commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

Basically the same issue as with #10005, only with nix instead of Arch.

@jdx jdx merged commit 65421b8 into jdx:main Jun 5, 2026
33 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.

2 participants