Browser (Firefox/Chromium) dev env

My end goal is to fork either Chrome or Firefox to extend some of the functionality.

My limited exp with browser dev is that both are famously obtuse to build - is anyone familiar with how to leverage Nix to solve this problem?

I’ve used nix shell in the past for simpler dev envs, e.g. for specific versions of gcc, or using musl over glibc.

Welcome @Comonad.

If you’d like to build Firefox yourself the way that Nix does, try this:

$ mkdir ~/Code/firefox
$ cd ~/Code/firefox
$ nix-shell -I nixpkgs=flake:github:nixos/nixpkgs '<nixpkgs>' -A firefox-unwrapped --pure
<snipped, lots of tools downloading>
$ genericBuild

That’ll get you started with an environment that’s got everything you need to build Firefox.

Once you get started with actual development, there’s certain to be more questions and approaches, but if you just want to see the build work, this will do it.

1 Like