Adds a flake.nix wrapping the prebuilt release binaries (the same .deb/.zip
artifacts nixpkgs brave uses) so the browser can be installed and run directly
from GitHub:
nix run github:brave/brave-browser
nix profile install github:brave/brave-browser
The flake reuses nixpkgs' brave packaging via overrideAttrs (swapping in
upstream version + per-platform SRI hashes), avoiding ~150 lines of duplicated
patchelf/wrapGApps/desktop-fixup logic. A scheduled lag-check workflow
auto-bumps version + hashes and opens a PR when flake.nix falls behind the
latest stable release.
Supported platforms: x86_64-linux, aarch64-linux, x86_64-darwin, aarch64-darwin.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
What
Adds a
flake.nixso the project can be installed and run directly from GitHub at the latest stable release:The flake tracks the default branch and is auto-bumped to the latest stable release by a daily workflow, so
github:brave/brave-browseralways serves the current release.Adds a
devbox.jsonfor reproducible development environments:Why
The project publishes prebuilt release artifacts and nixpkgs already packages Brave via
make-brave.nix, but there is no repo-owned flake. A repo-owned flake letsnix run github:brave/brave-browsertrack upstream releases directly (the nixpkgs package lags behind by days/weeks). For users who already have Nix installed, a flake provides:nix run github:brave/brave-browserwith no clone or manual build steps.flake.lock. If it builds today, it builds in ten years.nix profile installtwice is a no-op.nix profile rollbackrestores the previous profile generation instantly.nix profile removeleaves no residue.Changes
flake.nix: Nix flake wrapping the prebuilt release binary aspackages.<system>.defaultandapps.<system>.default. Reuses nixpkgsbravepackaging viaoverrideAttrs(swapping in upstream version + per-platform SRI hashes) to avoid duplicating ~150 lines of patchelf/wrapGApps/desktop-fixup logic.flake.lock: pinnednixpkgs-unstableinput..github/workflows/nix-release.yml: scheduled lag-check automation that auto-bumpsversion+ per-platformsha256hashes and opens a PR whenflake.nixfalls behind the latest stable release.devbox.json: Devbox configuration for reproducible development environments..gitignore: added Nix build result symlinks (/result,/result-*).README.md: added Nix installation subsection under Downloads.Testing
Verified locally:
Builds and runs successfully on
x86_64-darwin(reportsBrave Browser 150.1.92.134).Notes
brave-core.bravepackaging (pkgs.brave.overrideAttrs) rather than vendoringmake-brave.nix. This means the patchelf/wrapGAppsHook3/desktop-file-fixup/icon-symlink/OutdatedBuildDetector-disable logic is maintained upstream in nixpkgs, and this repo only maintainsversion+ 4 SRI hashes.github:brave/brave-browser/vX.Y.Z) is not supported — release tags are cut before the bump workflow updatesflake.nix. Usegithub:brave/brave-browser(tracks default branch) or pin to a commit SHA.github.repository == 'brave/brave-browser'so it only runs upstream, not on forks.Related
Resolves #56931