Skip to content

Add Nix flake for Warp#9373

Closed
VitalyAnkh wants to merge 2 commits intowarpdotdev:masterfrom
VitalyAnkh:fix/9296-nix-flake
Closed

Add Nix flake for Warp#9373
VitalyAnkh wants to merge 2 commits intowarpdotdev:masterfrom
VitalyAnkh:fix/9296-nix-flake

Conversation

@VitalyAnkh
Copy link
Copy Markdown

@VitalyAnkh VitalyAnkh commented Apr 29, 2026

Description

Adds a first-party Nix flake for Linux users.

What changed:

  • Adds flake.nix/flake.lock with packages.default and packages.warp-terminal for x86_64-linux and aarch64-linux.
  • Builds the OSS Warp Linux binary from source with the repository Rust toolchain and the release_bundle, gui, and nld_improvements features.
  • Installs bundled resources, generated settings schema, generated third-party license attribution, desktop entry, icons, and licenses into the package output.
  • Wraps the executable with the runtime libraries needed on Nix systems.
  • Adds a matching devShell for Nix-based Rust development.

Testing

  • nix flake show --all-systems --no-write-lock-file
  • nix flake check --all-systems --no-build --print-build-logs
  • nix build .#warp-terminal --print-build-logs
  • result/bin/warp-terminal --help
  • GUI smoke test with isolated HOME/XDG dirs: timeout 20s result/bin/warp-terminal stayed running until timeout and created Warp config/cache files.
  • Verified installed bundled resources: 123 files under result/opt/warpdotdev/warp-terminal/resources/bundled.
  • Verified generated THIRD_PARTY_LICENSES.txt is installed under both opt/warpdotdev/warp-terminal/resources and share/licenses/warp-terminal, with matching contents.

Server API dependencies

No server API dependencies.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Changelog Entries for Stable

CHANGELOG-IMPROVEMENT: Added first-party Nix flake support for Linux users to build Warp from source.

Co-Authored-By: Warp agent@warp.dev

Adds a first-party Nix flake that builds the OSS Warp Linux binary from source, installs desktop assets and bundled resources, and exposes a development shell.

Co-Authored-By: Warp <agent@warp.dev>
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Apr 29, 2026

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @VitalyAnkh on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment @cla-bot check to trigger another check.

@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented Apr 29, 2026

@VitalyAnkh

I'm starting a first review of this pull request.

I requested changes on this pull request and posted feedback.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

I'm re-reviewing this pull request in response to a review request.

You can view the conversation on Warp.

I requested changes on this pull request and posted feedback.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

This PR adds a Nix flake for building and developing the OSS Warp Linux package, including pinned inputs, Rust build plumbing, runtime wrapping, desktop/icon installation, and a dev shell.

Concerns

  • The package output omits the third-party license attribution generated by the existing bundling flow, even though it redistributes Cargo dependencies and bundled resources.

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread flake.nix
Comment on lines +189 to +190
install -Dm644 LICENSE-AGPL "$out/share/licenses/warp-terminal/LICENSE-AGPL"
install -Dm644 LICENSE-MIT "$out/share/licenses/warp-terminal/LICENSE-MIT"
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.

⚠️ [IMPORTANT] The Nix package only installs Warp's top-level licenses and skips the THIRD_PARTY_LICENSES.txt generated by script/prepare_bundled_resources, so the distributed package omits third-party attributions for Cargo dependencies and bundled resources. Generate and install that notice here, or reuse the existing bundling script, before shipping this as a first-party package.

@VitalyAnkh
Copy link
Copy Markdown
Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label Apr 29, 2026
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Apr 29, 2026

The cla-bot has been summoned, and re-checked this pull request!

Use the existing bundled-resource preparation script so the Nix package includes the generated THIRD_PARTY_LICENSES.txt in both bundled resources and share/licenses.
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented Apr 29, 2026

@VitalyAnkh

I'm checking this implementation PR for association with an explicitly linked issue.

The PR that you've opened seems to contain implementation changes and is associated with issue #9296, but none of those associated issue are marked as ready-to-implement. This PR will be automatically closed. Please see our contribution docs for guidance on when changes are accepted for issues.

Powered by Oz

@oz-for-oss oz-for-oss Bot closed this Apr 29, 2026
@VitalyAnkh
Copy link
Copy Markdown
Author

/oz-review

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

This PR adds a first-party Nix flake and lockfile for building the OSS Linux Warp package, including vendored Cargo dependencies, runtime wrapping, bundled resources, desktop metadata, icons, licenses, and a dev shell.

Concerns

  • The Nix package currently prepares bundled resources and the settings schema as the dev channel while installing the warp-oss binary and OSS desktop entry. This can ship dogfood/preview-only resources and dev-only schema entries in the OSS package; the inline comment suggests aligning resources/schema with OSS/release behavior.
  • Security pass: inputs and external sources are pinned with hashes, and no additional security-specific issue was identified in the changed diff.

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread flake.nix
Comment on lines +184 to +191
SKIP_SETTINGS_SCHEMA=1 ./script/prepare_bundled_resources \
"${resourcesDir}" \
dev \
release

"$out/bin/generate_settings_schema" \
--channel dev \
"${resourcesDir}/settings_schema.json"
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.

⚠️ [IMPORTANT] This builds the warp-oss binary and installs the OSS desktop entry, but prepares resources and schema as dev, which includes dogfood/preview-gated skills and dev-only setting flags; use the OSS channel for resource copying and a release-channel schema (or add explicit OSS schema support) so the Nix package matches the runtime channel.

Suggested change
SKIP_SETTINGS_SCHEMA=1 ./script/prepare_bundled_resources \
"${resourcesDir}" \
dev \
release
"$out/bin/generate_settings_schema" \
--channel dev \
"${resourcesDir}/settings_schema.json"
SKIP_SETTINGS_SCHEMA=1 ./script/prepare_bundled_resources \
"${resourcesDir}" \
oss \
release
"$out/bin/generate_settings_schema" \
--channel stable \
"${resourcesDir}/settings_schema.json"

@VitalyAnkh VitalyAnkh mentioned this pull request Apr 29, 2026
1 task
@VitalyAnkh
Copy link
Copy Markdown
Author

Superseded by #9394.

That follow-up PR carries this Nix flake work forward and includes the fixes requested here: generated third-party license attribution, stable-channel bundled resources/settings schema, and narrower shebang patching during packaging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant