The WebRTC parts of Firefox 122.0 are unconditionally linked against the
vendored libvpx that they ship with This lead to an ABI mismatch¹, when
building with --with-system-libvpx, since our libvpx version differs.
An upstream fix is expected to be shipped in Firefox 122.0.1, which is
due in the next few days.
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1875201#c11
The rust toolchain is required for chromium since M121.
In the last major bump (M120 -> M121) we had to work around this
requirement because we hadn't had our that part of our toolchain ready.
Until now :)
So this fixes and enables the toolchain for any chromium/electron >= 121
and removes the workaround from the last major bump.
This fixes the following error:
```
Running phase: installPhase
patchelf: getting info about '/nix/store/s5dybbabbwn2w7jqdv5fk0cn7jzq54b1-google-chrome-121.0.6167.85/share/google/chrome/nacl_helper': No such file or directory
```
`nacl_helper` is no longer present in the tarball since M121, so this
patch simply removes it from the hardcoded list of paths to patchelf.
I did some very brief and everything seems to work fine.
M121 is the first version to require the new rust toolchain, which we
haven't ready yet.
Specifically, there seems to be an issue where clang looks up library
paths (with `clang_version = 17;` added to `gnFlags` (defaults to 18 and
is part of the lookup path)):
```
ninja: error: '../../../../nix/store/q5f07rqsvsxnzwbw97yi8lacksrmy13x-clang-wrapper-17.0.6/lib/clang/17/lib/x86_64-unknown-linux-gnu/libclang_rt.builtins.a', needed by 'obj/third_party/protobuf/libprotoc_lib.a', missing and no known rule to make it
```
Instead of
```
/nix/store/q5f07rqsvsxnzwbw97yi8lacksrmy13x-clang-wrapper-17.0.6/lib/clang/17/lib/x86_64-unknown-linux-gnu/libclang_rt.builtins.a
/nix/store/q5f07rqsvsxnzwbw97yi8lacksrmy13x-clang-wrapper-17.0.6/lib/clang/18/lib/x86_64-unknown-linux-gnu/libclang_rt.builtins.a
```
it should be something like
```
/nix/store/q5f07rqsvsxnzwbw97yi8lacksrmy13x-clang-wrapper-17.0.6/resource-root/lib/linux/libclang_rt.builtins-x86_64.a
```
So to give us ever so slightly more time to figure out and fix the rust
toolchain, we revert the upstream commit, that requires the rust
toolchain.
The c++ version of the QR code generator will be gone in the next few
version bumps, meaning we can no longer work around this by then.
Again, this is only to buy us ever so slightly more time.
This could have been prepared better and ahead of the stable bump, but
we simply don't have enough chromium maintainers right now :(
After #235912 changed the binary name for some Firefox packages, the meta.mainProgram value was no longer accurate and commands such as nix run nixpkgs#firefox-devedition failed because /bin/firefox was executed instead of /bin/firefox-devedition.
This sets meta.mainProgram to launcherName, which contains the nameSuffix set in #235912, instead of inheriting the unwrapped package's mainProgram, which is always firefox with no suffix.