Created
July 16, 2025 08:14
-
-
Save ilsubyeega/897a3eba47a198798177df10b3de8dd0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
description = "Build configuration for brave browser"; | |
inputs = { | |
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; | |
}; | |
outputs = { nixpkgs, ... }@inputs: let | |
system = "x86_64-linux"; | |
pkgs = import nixpkgs { inherit system; }; | |
nixpkgs_chromium_path = "${inputs.nixpkgs}/pkgs/applications/networking/browsers/chromium"; | |
python3WithPackages = pkgs.python3.pythonOnBuildForHost.withPackages ( | |
ps: with ps; [ | |
ply | |
jinja2 | |
setuptools | |
] | |
); | |
# https://github.com/NixOS/nixpkgs/blob/d2cb712ff42e36a466e25131b17a5403c7b3d4f3/pkgs/applications/networking/browsers/chromium/common.nix#L294 | |
nativeBuildInputs = pkgs: with pkgs; [ | |
nodejs_22 # brave requires to node be v22. | |
# chromium | |
ninja | |
gn # new version required? | |
pkg-config | |
python3WithPackages | |
perl | |
which | |
buildPackages.rustc.llvmPackages.bintools | |
bison | |
gperf | |
libusb1 | |
udev | |
curlFull # libcurl-gnutls.so.4 | |
curlWithGnuTls | |
lief | |
zlib | |
# https://chromium.googlesource.com/chromium/src/+/refs/heads/main/tools/nix/make-shell-for-system.nix | |
google-cloud-sdk pkg-config zlib gperf expat glib nss nspr | |
]; | |
PROJECT_ROOT = builtins.getEnv "PWD"; | |
in with pkgs; { | |
devShells.${system}.default = (buildFHSEnv { | |
name = "brave-dev"; | |
targetPkgs = nativeBuildInputs; | |
multiArch = true; | |
profile = '' | |
export PATH=${PROJECT_ROOT}/src/third_party/depot_tools:$PATH | |
alias cd="cd -P" | |
''; | |
}).env; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment