Skip to content

Add Nix flake for Warp#9394

Open
VitalyAnkh wants to merge 4 commits intowarpdotdev:masterfrom
VitalyAnkh:fix/9296-nix-flake
Open

Add Nix flake for Warp#9394
VitalyAnkh wants to merge 4 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 stable-channel settings schema, generated third-party license attribution, desktop entry, icons, and licenses into the package output.
  • Uses the stable release channel when preparing bundled resources and settings metadata so the public Nix package does not include dogfood/preview-gated resources.
  • Patches only the resource helper script shebangs needed during packaging.
  • 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-out-paths --print-build-logs
    • Built /nix/store/x0m983q27jkq70ydynz1i9dgvpkwcrk9-warp-terminal-0.1.0+b742d4e.
  • result/bin/warp-terminal --help
  • GUI smoke test with isolated HOME/XDG dirs: timeout 20s result/bin/warp-terminal stayed running until timeout (status=124).
  • Verified generated settings schema reports JSON Schema for Warp settings (stable channel, 185 settings).
  • Verified stable-channel bundled resources: 122 bundled files, 10 bundled skill directories, and no triage-vulnerabilities dogfood-gated skill in the package output.
  • 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

VitalyAnkh and others added 2 commits April 29, 2026 14:17
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>
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.
@cla-bot cla-bot Bot added the cla-signed label Apr 29, 2026
@oz-for-oss
Copy link
Copy Markdown

oz-for-oss Bot commented Apr 29, 2026

@VitalyAnkh

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

I'm re-reviewing this pull request in response to a review 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 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 approved this pull request. No matching stakeholder was found for the changed files, so no human reviewers were requested.

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

You can view the conversation on Warp.

I approved this pull request. No matching stakeholder was found for the changed files, so no human reviewers were requested.

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

Powered by Oz

@VitalyAnkh
Copy link
Copy Markdown
Author

/oz-review

Copy link
Copy Markdown

@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 Linux Nix flake and dev shell for building the OSS Warp binary, packaging resources, desktop metadata, icons, licenses, and runtime wrappers.

Concerns

  • The package builds warp-oss but generates bundled resources and the settings schema as the dev channel. In this repository, dev maps to dogfood-gated skills and enables release, preview, dogfood, and debug feature flags for schema generation, so the Nix output can ship internal/experimental assets and settings that should not be part of the OSS package.

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 Outdated
Comment on lines +184 to +190
SKIP_SETTINGS_SCHEMA=1 ./script/prepare_bundled_resources \
"${resourcesDir}" \
dev \
release

"$out/bin/generate_settings_schema" \
--channel dev \
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ [IMPORTANT] This packages the OSS binary with dev-channel resources/schema; dev copies dogfood/preview-gated skills and generate_settings_schema enables DEBUG/DOGFOOD/PREVIEW flags, so the Nix package can expose internal/experimental assets and settings not intended for OSS users. Use an OSS/stable-equivalent channel for both resource copying and schema generation.

Copy link
Copy Markdown

@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 that builds and packages the OSS Warp Linux binary with bundled resources, desktop metadata, icons, license files, runtime wrappers, and a matching development shell.

Concerns

  • The package builds the OSS binary but prepares resources and the settings schema as the dev channel, which can expose dogfood-gated bundled resources and dev-only settings metadata in a public Nix package.

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

Choose a reason for hiding this comment

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

⚠️ [IMPORTANT] This builds the public warp-oss binary but prepares resources and the settings schema as dev; that includes dogfood-gated skills via copy_conditional_skills and emits a dev/debug settings schema. Use a public channel here, or add explicit oss support before shipping this package.

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

@oz-for-oss
Copy link
Copy Markdown

oz-for-oss Bot commented Apr 29, 2026

@VitalyAnkh

I'm checking this implementation PR for association with a likely matching ready issue.

Powered by Oz

@VitalyAnkh
Copy link
Copy Markdown
Author

/oz-review

Copy link
Copy Markdown

@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 for building and developing the Linux Warp OSS package, including pinned Nix inputs, vendored Cargo dependencies, resource/schema/license installation, wrapper setup, and a matching development shell.

Concerns

  • No blocking correctness or security concerns found in the inlined diff. The external Nix inputs and auxiliary source fetches are pinned by lockfile/hash, and the packaging steps are scoped to the new flake files.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

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

Powered by Oz

@VitalyAnkh
Copy link
Copy Markdown
Author

/oz-review

Copy link
Copy Markdown

@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 that builds and packages the OSS Warp Linux binary for x86_64-linux and aarch64-linux, including bundled resources, settings schema generation, license attribution, desktop metadata, icons, runtime wrapping, and a matching development shell.

Concerns

  • No blocking correctness or security concerns were found in the reviewed diff.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

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

Powered by Oz

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