Skip to content

chore: flake.nix for running forge with nix run#2552

Merged
tusharmath merged 4 commits intotailcallhq:mainfrom
hencjo:nix-flake-build-and-readme
Mar 14, 2026
Merged

chore: flake.nix for running forge with nix run#2552
tusharmath merged 4 commits intotailcallhq:mainfrom
hencjo:nix-flake-build-and-readme

Conversation

@hencjo
Copy link
Copy Markdown
Contributor

@hencjo hencjo commented Mar 13, 2026

For those of us running software from the internet using nix flakes instead of curl.

This brings a flake.nix that allows us to run forge (or install it) by simply running nix run github:antinomyhq/forge.

Thanks!

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 13, 2026

CLA assistant check
All committers have signed the CLA.

@hencjo hencjo force-pushed the nix-flake-build-and-readme branch from 3fc97bc to 69a27ee Compare March 13, 2026 11:24
Comment thread flake.nix

PROTOC = "${pkgs.protobuf}/bin/protoc";
PROTOC_INCLUDE = "${pkgs.protobuf}/include";
APP_VERSION = "0.1.0-dev";
Copy link
Copy Markdown
Contributor

@amitksingh1490 amitksingh1490 Mar 13, 2026

Choose a reason for hiding this comment

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

Thanks for the PR.
Can we use the prebuilt binary from the GitHub releases? Otherwise, it might be difficult to identify the version if a developer encounters an issue.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

When working with the code checked out, one typically runs nix build, which then builds the current directory's flake. So one doesn't want to point to a remote, as that breaks developing locally.

One can run nix run github:antimonyhq/forge/TAG if one wants to run a specific tag/release.

Also, artifacts built with nix expects dynamic libraries in /nix/store, so the usual locations in a pre-built release wouldn't work. (I haven't tested this specifically for forge though.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for giving this attention - it's very much appreciated :).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hi @hencjo !
Nix was definitely on my mind! However this approach might have an issue in the future as we plan to allow only signed releases to use ForgeCode Services.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Maybe we can figure something out :).

When you say signed releases; is that a release built from a signed git tag or a signed binary? (I don't see how a service endpoint could verify that the client-side is running signed a signed binary as the user's environment isn't trusted by you.)

In this case I'm running forge against a local on-prem llm. With other tools, such as OpenCode, I make a vendored version with the necessary local certificates and config to make it easier for other users to use it. This vendoring is trivial with nix flakes which is why I'm here.

@tusharmath tusharmath enabled auto-merge (squash) March 14, 2026 10:15
@tusharmath tusharmath changed the title flake.nix for running forge with nix run chore: flake.nix for running forge with nix run Mar 14, 2026
@tusharmath tusharmath merged commit aa2a050 into tailcallhq:main Mar 14, 2026
9 checks passed
@hencjo hencjo deleted the nix-flake-build-and-readme branch March 14, 2026 11:08
@tusharmath tusharmath added the type: chore Routine tasks like conversions, reorganization, and maintenance work. label Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: chore Routine tasks like conversions, reorganization, and maintenance work.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants