Skip to content

fix: replace shazow/foundry.nix with nixpkgs foundry to fix nightly URL failures - #1131

Closed
shunkakinoki wants to merge 1 commit into
mainfrom
fix/foundry-nightly-url-failures
Closed

fix: replace shazow/foundry.nix with nixpkgs foundry to fix nightly URL failures#1131
shunkakinoki wants to merge 1 commit into
mainfrom
fix/foundry-nightly-url-failures

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Mar 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • The foundry nightly binary downloads were causing intermittent CI failures — either hash mismatches or HTTP 500 errors from GitHub release URLs
  • The locked revision of shazow/foundry.nix (c3aea6faee9fd2fadebccd37c35376bf85d4e524) references nightly-d055c0999b23e2b045acba0e402f83d1e1e20496 binaries that are unreliable
  • Replace with stable pkgs.foundry from nixpkgs (v1.5.1) via a local overlay alias (foundry-bin = prev.foundry)
  • Remove the foundry flake input entirely

Test plan

  • nix-linux CI job passes (no more foundry download failures)
  • nix-nixos CI job passes
  • nix-darwin CI job passes (was failing with curl 500 on foundry_nightly_darwin_arm64.tar.gz)
  • foundry-bin package resolves to nixpkgs foundry 1.5.1

🤖 Generated with Claude Code


Summary by cubic

Switch Foundry from shazow/foundry.nix nightly builds to the stable nixpkgs foundry (v1.5.1). This stabilizes CI by avoiding unreliable nightly URLs.

  • Bug Fixes
    • Alias foundry-bin to prev.foundry via a local overlay.
    • Remove the foundry flake input and its entries from flake.lock.

Written for commit 1707555. Summary will update on new commits.

…RL failures

The foundry nightly binary downloads were unreliable (hash mismatches and 500
errors from GitHub), causing intermittent CI failures. Switch to the stable
nixpkgs foundry package (1.5.1) via a local overlay alias.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 17, 2026 05:45
@mesa-dot-dev

mesa-dot-dev Bot commented Mar 17, 2026

Copy link
Copy Markdown

You do not have enough credits to review this pull request. Please purchase more credits to continue.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the stability of the project's CI pipeline by migrating the Foundry dependency from an unreliable nightly build source to a stable version provided directly by Nixpkgs. This change resolves recurring build failures related to binary downloads, ensuring a more consistent and predictable development environment without altering the core functionality that relies on Foundry.

Highlights

  • Dependency Update: Replaced the shazow/foundry.nix flake input with the stable pkgs.foundry from Nixpkgs (v1.5.1) to ensure more reliable binary downloads.
  • CI Stability: Addressed intermittent CI failures caused by unreliable nightly binary downloads (hash mismatches or HTTP 500 errors) from the previous shazow/foundry.nix source.
  • Flake Input Removal: Removed the foundry flake input entirely from flake.nix and flake.lock.
  • Local Overlay Alias: Introduced a local overlay alias foundry-bin = prev.foundry to provide access to the stable Nixpkgs version of Foundry.
Changelog
  • flake.lock
    • Removed the foundry flake input entry and its associated locked details.
    • Removed the flake-utils flake input entry, which was a dependency of the removed foundry input.
    • Updated the inputs section to reflect the removal of the foundry dependency.
  • flake.nix
    • Deleted the foundry flake input definition from the inputs section.
  • overlays/default.nix
    • Replaced the direct import of inputs.foundry.overlay.
    • Introduced a new overlay that defines foundry-bin as an alias for the stable prev.foundry from Nixpkgs.
    • Added comments explaining the rationale behind the new overlay for improved clarity.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai

coderabbitai Bot commented Mar 17, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6693149e-ad1b-41eb-a195-cf0c31002b2c

📥 Commits

Reviewing files that changed from the base of the PR and between 0ee04f3 and 1707555.

⛔ Files ignored due to path filters (1)
  • flake.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • flake.nix
  • overlays/default.nix
💤 Files with no reviewable changes (1)
  • flake.nix

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Reorganized build tool dependencies and references. Removed an external input dependency and introduced a new reference mechanism for accessing the build tool through the overlay system. No user-facing functionality has changed.

Walkthrough

The flake's dependency management is restructured: the foundry input is removed from flake.nix, while overlays/default.nix introduces a foundry-bin attribute that aliases to prev.foundry, shifting the foundry reference sourcing strategy without altering downstream behavior.

Changes

Cohort / File(s) Summary
Flake Inputs
flake.nix
Removed foundry input entry from the flake's inputs attribute set, eliminating the external dependency declaration.
Overlay Configuration
overlays/default.nix
Replaced inputs.foundry.overlay reference with a new foundry-bin public attribute aliasing prev.foundry, changing how foundry is exposed in the overlay.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

bug

Poem

🐰 The foundry input hops away,
But foundry-bin comes out to play,
An overlay tweak, so small, so neat,
Dependencies dance to a cleaner beat! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: replacing the unreliable shazow/foundry.nix nightly input with stable nixpkgs foundry to fix CI failures.
Description check ✅ Passed The description is well-related to the changeset, explaining the problem (nightly failures), the solution (replace with stable nixpkgs), and providing a test plan.
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
  • Commit unit tests in branch fix/foundry-nightly-url-failures
📝 Coding Plan
  • Generate coding plan for human review comments

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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request addresses intermittent CI failures by replacing the shazow/foundry.nix flake input, which provided unreliable nightly binaries, with the stable foundry package from nixpkgs. The changes involve removing the foundry input from flake.nix and flake.lock, and adding an overlay to alias foundry-bin to the nixpkgs version. The changes are correct and achieve the stated goal. I've added one suggestion to improve the maintainability of the overlays file by merging multiple overlay functions.

Comment thread overlays/default.nix
Comment on lines +5 to +9
(final: prev: {
# Use stable nixpkgs foundry instead of shazow/foundry.nix nightly overlay
# to avoid unreliable nightly binary downloads.
foundry-bin = prev.foundry;
})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

For better readability and to reduce boilerplate, you could merge this new overlay with the other subsequent inline overlays in this file into a single overlay function. This is a common pattern in Nix development that improves maintainability.

For example, you could combine this overlay with the next one for neovim-unwrapped:

(final: prev: {
  # Use stable nixpkgs foundry instead of shazow/foundry.nix nightly overlay
  # to avoid unreliable nightly binary downloads.
  foundry-bin = prev.foundry;

  # Ensure neovim-unwrapped exposes a lua attribute for wrapper consumers (e.g., home-manager)
  neovim-unwrapped =
    (prev.neovim-unwrapped.overrideAttrs (oldAttrs: {
      passthru = (oldAttrs.passthru or { }) // {
        lua = prev.lua5_4;
      };
    }))
    // {
      lua = prev.lua5_4;
    };
})

You could apply this pattern to all the separate overlay functions in this list.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the shazow/foundry.nix nightly overlay/input (which was causing intermittent CI failures due to unreliable nightly release URLs) and switches the configuration to use the stable Foundry package from nixpkgs via a small local overlay alias.

Changes:

  • Replace inputs.foundry.overlay usage with a local overlay that provides foundry-bin = prev.foundry.
  • Remove the foundry flake input from flake.nix.
  • Prune the foundry (and now-unneeded flake-utils) nodes/references from flake.lock.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
overlays/default.nix Drops the external Foundry overlay and introduces a local alias to nixpkgs’ Foundry package.
flake.nix Removes the foundry flake input definition.
flake.lock Removes the locked foundry dependency graph entries and corresponding root input reference.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 3 files

@mesa-dot-dev

mesa-dot-dev Bot commented Mar 17, 2026

Copy link
Copy Markdown

Mesa Description

TL;DR

Replaced shazow/foundry.nix with stable nixpkgs foundry (v1.5.1) to resolve intermittent CI failures caused by unreliable nightly binary downloads.

What changed?

  • Replaced unreliable shazow/foundry.nix with pkgs.foundry from nixpkgs (v1.5.1)
  • Added a local overlay alias foundry-bin = prev.foundry
  • Removed the foundry flake input entirely

Description generated by Mesa. Update settings

@shunkakinoki
shunkakinoki deleted the fix/foundry-nightly-url-failures branch March 21, 2026 23:59
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