Commit graph

323 commits

Author SHA1 Message Date
Martin Weinelt
83d02af8b3
firefox-unwrapped: 138.0.4 -> 139.0
https://www.mozilla.org/en-US/firefox/139.0/releasenotes/
2025-05-26 23:26:16 +02:00
Vladimír Čunát
9312c4398c
thunderbird: fix calendar again after icu77 switch 2025-05-16 08:08:57 +02:00
Martin Weinelt
63a1d0d0f9
buildMozillaMach: update nss version range
While building Firefox ESR with the latest NSS version generally works
we and upstream actually prefer using the ESR versions together.
2025-05-12 03:51:57 +02:00
Martin Weinelt
a8fe4053db
buildMozillaMach: reenable system-icu
By appling a patch from chaotic-nyx linking against icu76 and newer works
again.

From Firefox 139 upstream uses icu77, but it already works today on
138.0.1.

https://bugzilla.mozilla.org/show_bug.cgi?id=1927380
2025-05-12 03:49:34 +02:00
Martin Weinelt
d20fb12c40
buildMozillaMach: cleanup 2025-05-12 03:49:16 +02:00
Niko Cantero
03cbda6fe0
buildMozillaMach: remove obsolete patches 2025-05-10 20:19:10 -04:00
Weijia Wang
61dcba2e47
buildMozillaMach: disable crash reporter support on loongarch64-linux (#403489) 2025-05-02 02:10:11 +02:00
Martin Weinelt
aad0072dbb
buildMozillaMach: disable geoclue when geolocation support is disabled
This was an oversight since support for geoclue was added in Firefox 102.
2025-05-01 03:27:57 +02:00
Martin Weinelt
672ccbddd5
buildMozillaMach: default to beacondb for location data
Mozilla Location Services was retired and our Google API keys have not
worked in years. This is also the new default for geoclue2 in nixpkgs.
2025-05-01 03:27:57 +02:00
Martin Weinelt
2091c38ec4
buildMozillaMach: apple-sdk_14 -> apple-sdk_15 starting with version 138 (#400163) 2025-04-28 16:30:30 +02:00
Martin Weinelt
91faf77291
buildMozillaMach: Add RELRHACK_LINKER patch (#401323) 2025-04-27 02:28:52 +02:00
Peter Collingbourne
7bb315a03c
buildMozillaMach: add RELRHACK_LINKER patch
Needed to fix cross compiling. Patch also sent upstream:
https://phabricator.services.mozilla.com/D246545
2025-04-27 01:39:43 +02:00
Peter Collingbourne
265bfbd502 firefox-unwrapped: Move nasm to nativeBuildInputs
Fixes cross compiling to x86.
2025-04-23 21:53:35 -07:00
Austin Horstman
236773740b
buildMozillaMach: apple-sdk_14 -> apple-sdk_15 starting with version 138
0:01.18 ERROR: SDK version "14.4" is too old. Please upgrade to at
least 15.2. Try updating your system Xcode. Newer versions of firefox
require apple-sdk_15.
2025-04-20 15:42:51 -05:00
Silvan Mosberger
374e6bcc40 treewide: Format all Nix files
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:

  nix-build ci -A fmt.check

This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).

This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).

Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](8616af08d9/maintainers/scripts/auto-rebase).

If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
2025-04-01 20:10:43 +02:00
Ryan Hendrickson
a8cf34bf84 firefox-devedition-unwrapped: fix branding 2025-03-13 22:16:28 -04:00
Martin Weinelt
e1a870dbed
firefox-unwrapped: 135.0.1 -> 136.0
https://www.mozilla.org/en-US/firefox/136.0/releasenotes/
https://www.mozilla.org/security/advisories/mfsa2025-14

Fixes: CVE-2025-1930, CVE-2025-1931, CVE-2025-1933, CVE-2025-1934,
       CVE-2025-1942, CVE-2025-1935, CVE-2025-1936, CVE-2025-1937,
       CVE-2025-1938, CVE-2025-1943
2025-03-04 18:48:53 +01:00
Yueh-Shun Li
0dbd2a7dcc
firefox, thunderbird: enable wrapped derivations for darwin (#377863) 2025-02-25 14:39:14 +08:00
Peder Bergebakken Sundt
5aba99242e treewide: fix typos in comments
Made with

```shell
git restore .
fd '\.nix$' pkgs/ --type f -j1 -x bash -xc "$(cat <<"EOF"
    typos --no-check-filenames --write-changes "$1"
    git diff --exit-code "$1" && exit
    #( git diff "$1" | grep -qE "^\+ +[^# ]") && git restore "$1"
    count1="$( bat --language nix --diff --style changes "$1" --theme "Monokai Extended" --color always | aha --no-header | grep -E '^<span style="color:olive;">~</span> ' | wc -l )"
    count2="$( bat --language nix --diff --style changes "$1" --theme "Monokai Extended" --color always | aha --no-header | grep -E '^<span style="color:olive;">~</span> (<span style="color:#f8f8f2;"> *</span>)?<span style="color:#75715e;">.*</span>$' | wc -l )"
    [[ $count1 -ne $count2 ]] && git restore "$1"
EOF
)" -- {}
```

and filtered with `GIT_DIFF_OPTS='--unified=15' git -c interactive.singleKey=true add --patch`

I initially tried using the tree-sitter cli, python bindings and even ast-grep through various means, but this is what I ended up with.
2025-02-24 10:44:41 +01:00
Ihar Hrachyshka
b856437376 firefox, thunderbird: enable wrapped derivations for darwin
It also aligns application names for wrapped and unwrapped flavors of
the same derivations; and uses unique application names for each flavor,
so it's now possible to install multiple versions on the same Darwin
machine.

One visible change now is that `About Firefox` window now shows:

`Firefox for NixOS` instead of `Mozilla Firefox for NixOS`

...in the `distribution` field. I think it's fine and doesn't infringe
on any trademarks because this field is not required to mention Mozilla at
all, as per: https://wiki.mozilla.org/Distribution_INI_File

While at it, also changed the branding for Darwin builds to list:

`Firefox for Nix on MacOS` instead of `Firefox for NixOS`

The telemetry and distribution ids (`nixos`) are left intact.

Note: it's still not possible to install both source-based and -bin
Darwin derivations in the same profile. It would require renaming
applicationNames for these two different types to use unique names (e.g.
`Firefox (Official)` or `Firefox (Binary)`, which doesn't seem optimal.

Closes: #378433
Closes: #366581
Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
2025-02-20 20:50:59 -05:00
Ryan Hendrickson
9df487993d firefox-{beta,devedition}: make binaryName match desktop file
This branches off of the unmerged PR #294971, which had the goal of
distinguishing between the various Firefox packages by giving them all
unique binaryNames. The goal of this PR, by contrast, is making the
names of the XDG desktop files that we generate match the name by which
Firefox will identify itself over D-Bus.

Co-authored-by: Xandor Schiefer <me@xandor.co.za>
2025-02-20 16:46:34 -05:00
Martin Weinelt
d962c35997
buildMozillaMach: use icu74 from version 134.0 2025-01-07 03:24:21 +01:00
Martin Weinelt
0a5a1828de
buildMozillaMach: update patch range for Python 3.12.8 compat issue 2025-01-06 23:15:54 +01:00
Martin Weinelt
1a04d6a876
firefox: extend compile flag "--enable-lto=cross" with parameter "full" (#366901) 2025-01-04 16:50:22 +01:00
Ihar Hrachyshka
a4890e046d firefox: fix darwin build 2024-12-29 17:59:05 -05:00
Tim W
5f0d21d9e7 firefox: extend compile flag "--enable-lto=cross" with parameter "full"
This fixes a regression in the discord web app. The issue was reported in:

    https://github.com/NixOS/nixpkgs/issues/332540

The regression was introduced in commit 23d4f834 via an upgrade of rust
compiler from 1.77.2 to 1.78.0. The fix is based on a comparison between the
generated firefox build script generated by

    pkgs/applications/networking/browsers/firefox/common.nix

and the firefox build script of archlinux found at:

    1376cddc7e/PKGBUILD

Enabling "full" link time optimization fixed the regression in the discord web
app. Further compile flags where not ported from the archlinux build script.
2024-12-20 19:32:30 +01:00
github-actions[bot]
8c5656aa89
Merge master into staging-next 2024-12-15 00:17:27 +00:00
Yureka
44c06fcc9f buildMozillaMach: elf-hack is only available on elf platforms
Followup to https://github.com/NixOS/nixpkgs/pull/365185
Probably darwin does not have the elf-hack options, so restrict it to
platforms which have Elf.

Change-Id: I2d585721ca08df57a7d2d55bb5a727d34b3fb216
2024-12-14 20:23:18 +01:00
Yureka
847c4e1028
buildMozillaMach: re-enable elf-hack with LTO/LLD, disable with musl (#365185)
The elfhack was completely revamped and is now implemented with the
"relrhack", which is compatible with LLD:
https://glandium.org/blog/?p=4297

Exposes a new option elfhackSupport and sets reasonable default based on
the properties of the new relrhack.

Change-Id: I687d4ee68a8e836e5c51a1fde0d28d019c0c66b9
2024-12-14 20:10:17 +01:00
Martin Weinelt
59e4669515
buildMozillaMach: patch compat with python 3.12.8/3.13.1
https://bugzilla.mozilla.org/show_bug.cgi?id=1935621
2024-12-08 19:07:19 +01:00
github-actions[bot]
56d0ebd983
Merge staging-next into staging 2024-11-21 18:05:12 +00:00
Emily
1e700c2bfa buildMozillaMach: apply upstream WASI SDK workaround for LLVM 19
I have no idea why this is necessary for us and why the upstream patch
doesn’t work, but this gets the Mozilla packages building on LLVM
19 in the meantime while we try to figure that out.

Closes: #352724
2024-11-20 02:14:49 +00:00
Ihar Hrachyshka
cd813611a4 firefox: enable darwin builds 2024-11-16 18:55:51 -05:00
Reno Dakota
52bf1163fa
treewide: use getLib when accessing clang / libclang / stdenv.cc.cc
In preparation to eliminate the lib output for the unwrapped clang, use
`lib.getLib` to access the `lib` output.
2024-11-07 10:27:41 +00:00
Sefa Eyeoglu
2c6f04a8e3
buildMozillaMach: update system dir patch for Firefox 133+
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2024-10-29 21:37:03 +01:00
jopejoe1
f3a4421f27 buildMozillaMach: change tests to an attrset 2024-10-19 15:16:57 +02:00
Artturin
e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
Martin Weinelt
ecedb9315a
buildMozillaMach: apply cbindgen patches for 128.1.x
Unbreaks Thunderbird, which has not yet received an update.
2024-09-04 02:52:26 +02:00
Martin Weinelt
1f7e809166
buildMozillaMach: update patches
- Drop nvidia wayland patches
- Retarget cbindgen patch for version 129 and versions before 128
2024-09-04 02:10:14 +02:00
Martin Weinelt
09b3126d1f
buildMozillaMach: backport patches to fix explicit sync on nvidia gpus
https://bugzilla.mozilla.org/show_bug.cgi?id=1898476

Closes: #335791
2024-08-21 02:11:37 +02:00
Martin Weinelt
3ea1895a74
buildMozillaMach: backport cbindgen 0.27.0 compat
The preliminary assumption is that this will land in 131 and then get
backported into the ESR releases. I don't plan to guess the correct
version boundaries at this time.
2024-08-21 02:04:08 +02:00
Martin Weinelt
a7ca865688
buildMozillaMach: prune patches
These do not apply to any version we carry any longer.
2024-08-21 02:04:08 +02:00
Martin Weinelt
f529f24e39
buildMozillaMach: pin icu at 73 for now
Pending https://bugzilla.mozilla.org/show_bug.cgi?id=1862601.
2024-06-29 12:40:53 +02:00
Vladimír Čunát
37366d94ec
firefox-esr: fixup build after version bump
It's included in there already, but we can't drop the patch yet,
as e.g. thunderbird still needs it, as of 115.11.1.
2024-06-12 10:19:17 +02:00
Alyssa Ross
0cee134634
buildMozillaMach: add patches for LLVM 18 and Rust 1.78 2024-05-06 09:31:22 +02:00
github-actions[bot]
69117017f0
Merge master into staging-next 2024-04-28 18:01:03 +00:00
Martin Weinelt
cf1efbbe19
buildMozillaMach: stop deleting the configure script
They're not autogenerated files any longer, and have been shipped as part
of the source tree since roughly Aug 2022.

Related: mozbz#1787977 ("Include configure in the tree")
Closes: #306937
2024-04-28 19:13:45 +02:00
Martin Weinelt
3faef42565
buildMozillaMach: stop polluting the hg tree
Moves the MOZ_OBJDIR into a path that is ignored through .hgignore, and
the MOZBUILD_STATE_PATH outside of the source root.

Closes: #306937
2024-04-28 16:13:25 +02:00
Jan Tojnar
eb04659fc2 treewide: wrapGAppsHook → wrapGAppsHook3
This was achieved using the following command:

    sd 'wrapGAppsHook\b' wrapGAppsHook3 (rg -l 'wrapGAppsHook\b')

And then manually reverted the following changes:

- alias in top-level.nix
- function name in wrap-gapps-hook.sh
- comment in postFixup of at-spi2-core
- comment in gtk4
- comment in preFixup of 1password-gui/linux.nix
- comment in postFixup of qgis/unwrapped-ltr.nix and qgis/unwrapped.nix
- comment in postFixup of telegram-desktop
- comment in postFixup of fwupd
- buildCommand of mongodb-compass
- postFixup of xflux-gui
- comment in a patch in kdePackages.kde-gtk-config and plasma5Packages.kde-gtk-config
- description of programs.sway.wrapperFeatures.gtk NixOS option (manual rebuild)
2024-04-27 02:23:22 +02:00
Nick Cao
034f0dbf72
firefox: enable webrtcSupport on riscv 2024-03-25 18:00:58 -04:00