Commit Graph

58 Commits

Author SHA1 Message Date
Hythera
c7657c0a13 buildMozillaMach: add support for extraPreConfigure 2026-08-04 23:05:48 +02:00
Sam Pointon
bd6051aa5f systems: also rename pkgsCross.wasi32, leaving aliases 2026-07-28 19:50:03 +01:00
Sam Pointon
629b4ee093 systems: rename extant wasi targets to wasip1
Wasi P2 is different enough to Wasi P1 to warrant being treated entirely 
separately, rather than as two minor variants of the same thing. P3 will 
likewise want to be a different target.

I've left aliases in place; maybe eventually, those can be deprecated 
and removed. I've tested this, but it's possible there might be breakage 
somewhere (e.g., the canonical doubles for P1 have changed, though I 
can't imagine why anyone would rely on that).

Fixes https://github.com/NixOS/nixpkgs/issues/435954
2026-07-28 19:50:03 +01:00
Ben Siraphob
eeefc5b648 firefox-esr: build on 32-bit (#542781) 2026-07-18 17:30:55 +00:00
Tol Wassman
f4f8338f0e Revert "buildMozillaMach: backport BZ 2047651 patch for 153"
This reverts commit 0374b4e5ac.
2026-07-16 21:19:20 +00:00
Ben Siraphob
b1ce11974e firefox: disable PGO on 32-bit 2026-07-16 13:52:45 -07:00
Ryan Hendrickson
0374b4e5ac buildMozillaMach: backport BZ 2047651 patch for 153 2026-07-11 19:20:50 -04:00
Martin Weinelt
1eadb818dd buildMozillaMach: enable structuredAttrs and strictDeps 2026-07-09 00:48:08 +02:00
Martin Weinelt
1cb1099ea9 buildMozillaMach: backport cbindgen 0.29.4 compat
Cherry-picked from 153 to remain compatible with cbindgen 0.29.4.
2026-06-30 03:11:48 +02:00
Martin Weinelt
b7a93ec9e6 buildMozillaMach: use python3.13 for versions below 143.0 2026-05-30 03:53:12 +02:00
Martin Weinelt
cb9090f062 buildMozillaMach: establish MOZ_PKG_FORMAT forward compat
Lowercae `tar` will throw a KeyError in future mach versions.
2026-05-28 03:35:36 +02:00
Ihar Hrachyshka
c19203e06f buildMozillaMach: fix darwin build
Versions before 144 vendor bindgen 0.69, which emits invalid Rust for
libc++ 21's attributed basic_string::__self_view alias on Darwin.

This was exposed by commit 0758fc3add ("darwin.libcxx:
20.1.0+apple-sdk-26.0 -> 21.1.6+apple-sdk-26.4"), where libc++
changed `basic_string::__self_view` from a typedef to an attributed
`using` alias. bindgen then drops the alias template parameter and emits
`basic_string___self_view = ...<_CharT>`.

The solution is to blocklist the unused `string_view` internals for the
profiler Rust API. They are not used in the actual build.

Note: Mozilla 144 updated vendored bindgen via:
https://bugzilla.mozilla.org/show_bug.cgi?id=1985509

Assisted-by: Codex gpt-5.5 xhigh
2026-05-26 21:59:44 -04:00
Martin Weinelt
9048c1fd7e buildMozillaMach: prune apple-sdk reverts
The apple-sdk is now on 26.4, which obsoletes all existing patches.
2026-05-15 00:46:02 +02:00
Stefan Frijters
df0f80bcea buildMozillaMach: move env variables into env 2026-02-07 14:23:41 +01:00
Martin Weinelt
c43b8cd611 buildMozillaMach: use vendored icu library
Mozilla vendors various patches on top of ICU that upstream is very slow
to accept. Instead of extracting the patches and keeping them up to date
on our system icu we decided it would likely be fine to rely on the
vendored version.
2026-01-28 23:21:39 +01:00
quantenzitrone
7d8132a92c treewide: remove references to the xorg namespace in pkgs (automated)
this creates some eval errors that will be fixed in the next commit

done with the following script:

```fish
\#!/usr/bin/env fish

set packagesjson (nix eval --impure --json --expr '
let
  lib = import ./lib;
in
import pkgs/servers/x11/xorg/default.nix (lib.mapAttrs (
  name: _:
  if name == "lib" then
    lib
  else if name == "config" then
    { allowAliases = false; }
  else
    name
) (__functionArgs (import pkgs/servers/x11/xorg/default.nix))) { }
' | jq)

set one (grep '^    [A-Za-z0-9_-]*$' pkgs/servers/x11/xorg/default.nix | string trim | string replace -r '$' Z | sort | string sub -e -1)
set two (grep '^  [A-Za-z0-9_-]* = [A-Za-z0-9_-]*;$' pkgs/servers/x11/xorg/default.nix | cut -d= -f1 | string trim | string replace -r '$' Z | sort | string sub -e -1)

for arg in $one $two
    set oname $arg
    set nname (echo $packagesjson | jq -r .$oname)

    if test $nname = null
        echo (set_color red)warn:(set_color normal) unknown package xorg.$oname >&2
        continue
    end

    echo $oname "->" $nname

    # replace basic xorg.$name references
    for file in (rg -F "xorg.$oname" --files-with-matches pkgs)
        # special cases
        sd -F "$oname = xorg.$oname;" "$nname = $nname;" $file

        # replace
        sd -F "xorg.$oname" "$nname" $file

        # fixup function arguments

        # prevent duplicate function args
        if grep -E " ($oname|$nname),\$" $file >/dev/null
            continue
        end

        if grep 'xorg\..' $file >/dev/null # case1: there is more so we can't just remove the function arg

            if grep ' xorg,$' $file >/dev/null
                sd ' xorg,$' " xorg,
                $nname," $file

            else if grep ' xorg ? .*,$' $file >/dev/null
                sd 'xorg( ? .*),$' "xorg\$1,
                $nname," $file

            else
                sd -F 'xorg,' "$nname,
                xorg," $file
            end

        else # case there is no more xorg..* so we can just replace the function arg
            sd 'xorg(| ? .*),.*$' "$nname," $file
        end
    end
end

nix fmt
```
2026-01-25 22:28:09 +01:00
Ihar Hrachyshka
9912c6a2d2 buildMozillaMach: increase hydra timeout to 1d on darwin
With lto enabled for darwin, we now observe timeouts in Hydra [1]. Looks
like the default timeout is ~4h, and usually builds succeeds in a few
hours, so 1d should be more than enough to complete a build, even with
heavy node load.

[1] https://hydra.nixos.org/build/319560484
2026-01-21 19:30:39 -05:00
Jo
ca634de812 firefox-{devedition,beta}-unwrapped: 147.0b9 -> 148.0b3 (#480814) 2026-01-17 19:29:22 +00:00
Ihar Hrachyshka
80a81a8070 buildMozillaMach: enable LTO for Darwin 2026-01-16 20:22:44 -05:00
Ihar Hrachyshka
4f4305abc5 buildMozillaMach: fix comment typo 2026-01-16 20:22:44 -05:00
jopejoe1
ec451f285c buildMozillaMach: revert changes for apple-sdk update on 148 2026-01-16 22:10:38 +01:00
jopejoe1
2eb8cbeb78 buildMozillaMach: use icu 78 for firefox 147 and newer 2026-01-10 01:27:49 +01:00
Martin Weinelt
9a4fa7dea7 buildMozillaMach: set argv to unwrapped binary name (#476929) 2026-01-05 14:50:47 +00:00
Florian Klink
004d72aa6e buildMozillaMach: switch to makeBinaryWrapper
This one is preferred.
2026-01-05 12:30:34 +02:00
Florian Klink
18028f81d4 buildMozillaMach: set argv to unwrapped binary name
mesa looks at the name of the executable / argv0 to determine which
quirks it should apply.

Example: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38845

By setting argv0 to .${binaryName}-wrapped instead of ${binaryName},
these do not apply.

I'm not sure what the "Needed to find Mozilla runtime" comment was
supposed to mean, but I can confirm dropping this line
(which is equivalent to `--argv0 "$out/bin/${binaryName}`
fixes the issue.
Firefox seems to run properly, with `about:support` reporting AGX
G13/G14 as intended by the mesa quirk, when running on an Asahi MacBook.

Fixes #476721.
2026-01-05 12:02:36 +02:00
Ihar Hrachyshka
b5a4982219 Revert "buildMozillaMach: use llvmPackages_20 on aarch64-darwin"
This reverts commit 40eea21c1e.
2025-12-10 21:11:52 -05:00
Gutyina Gergő
bcd4cbab5f various: revert accidental deletions 2025-12-10 00:46:12 +01:00
Wolfgang Walther
29358c2417 maintainers: drop garbas
Reacted to 0 out of 1 maintainer pings in the least 180 days.

Commit bit was recently removed with his approval for inactivity.
2025-12-09 21:09:06 +01:00
Martin Weinelt
0d44beb3ad buildMozillaMach: remove apple-sdk_15 hack for fileport.h (#468742) 2025-12-07 23:44:09 +00:00
Ihar Hrachyshka
7a4158692e buildMozillaMach: revert apple SDK bump to 26.1
Our SDK version is still 26.0. Upstream bumped it proactively because of
artifact availability concerns, not because a patch needed it.

https://bugzilla.mozilla.org/show_bug.cgi?id=1998070#c0

Fixes #468479
2025-12-07 13:11:08 -05:00
Ihar Hrachyshka
1390e7f6d9 buildMozillaMach: remove apple-sdk_15 hack for fileport.h
master now carries 15.5 so the hack is no longer needed.
2025-12-07 12:53:54 -05:00
Martin Weinelt
16c0f12563 Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
- pkgs/build-support/build-mozilla-mach/default.nix
2025-11-07 13:41:16 +01:00
jopejoe1
5d1597fb5a buildMozillaMach: fix build for firefox 145 or later 2025-11-04 21:13:57 +01:00
nixpkgs-ci[bot]
43bf6e2950 Merge staging-next into staging 2025-10-28 14:02:16 +00:00
Vladimír Čunát
478ff0b6ea Merge branch 'master' into staging 2025-10-28 13:53:35 +01:00
Martin Weinelt
d0248d42d5 buildMozillaMach: remove wrapGAppsHook3 from darwin deps (#455892) 2025-10-28 12:50:03 +00:00
Ihar Hrachyshka
40eea21c1e buildMozillaMach: use llvmPackages_20 on aarch64-darwin
There's a bug in llvm 21 that makes Firefox crash on loading a PNG
favicon that is being investigated in Mozilla bug tracker:

https://bugzilla.mozilla.org/show_bug.cgi?id=1995582

While this is being fixed, switch to llvmPackages_20 for aarch64-darwin.
(x86_64-darwin is not affected.)

Note: this change will also affect Thunderbird. Though strictly speaking
not a required change because we are not aware of a specific issue with
Thunderbird (yet), I feel we may want to stick to the same LLVM for both
types of Mozilla apps while this is being investigated. It also
simplifies the code somewhat.

Fixes #453372
2025-10-27 22:43:13 -04:00
Ihar Hrachyshka
e634b9ec1f buildMozillaMach: remove wrapGAppsHook3 from darwin deps
The wrapper is used on platforms other than darwin.
2025-10-26 10:52:16 -04:00
nixpkgs-ci[bot]
6c808af182 Merge staging-next into staging 2025-10-20 00:18:46 +00:00
Martin Weinelt
80afcb35c2 nss_3_115: drop
All consumers have migrated to newer nss versions.
2025-10-19 20:36:43 +02:00
nixpkgs-ci[bot]
a7c24797a7 Merge staging-next into staging 2025-10-14 06:06:40 +00:00
Martin Weinelt
dd550ca29c nss_3_114: drop
No consumers of this package are left. They were Firefox and Thunderbird
 141-142.
2025-10-14 01:25:00 +02:00
Randy Eckenrode
f289552347 build-support/build-mozzila-mach: drop SDK version workaround patch
The 15.5 SDK is available in nixpkgs, so this patch is no longer needed.
2025-10-09 18:23:27 -04:00
Martin Weinelt
2986b198bf buildMozillaMach: use nss 3.115 for 143, 3.116 for 144 2025-09-16 17:20:14 +02:00
Vladimír Čunát
0d30edcec6 Reapply "buildMozillaMach: use nss-esr for 140esr and older"
This reverts commit 2b96c79244.
2025-08-31 08:23:21 +02:00
Ihar Hrachyshka
5dfd85b1b9 firefox-beta: fix darwin build
Recent firefox started using fileport.h API. This API was exposed in SDK
15.4, but we are still running on 15.2. XNU source headers contain the
header for some time, so we can pull it from there instead.
2025-08-27 10:08:08 -04:00
Martin Weinelt
fd0ad4fee8 buildMozillaMach: restore MOZ_SYSTEM_DIR patch
Accidentally dropped while pruning obsolete patches.
2025-08-26 21:39:41 +02:00
Martin Weinelt
b65bcee42a buildMozillaMach: restore no-buildconfig patch
The accidental removal bloated the runtime closure of all consumers.
2025-08-26 13:28:48 +02:00
Ryan Hendrickson
d3140d8596 buildMozillaMach: use nss_3_114 as needed
As reported in https://github.com/NixOS/nixpkgs/pull/435118, Firefox
versions prior to 143 crash when used with nss 3.115.
2025-08-25 16:52:33 -04:00
Martin Weinelt
e11bcbb432 buildMozillaMach: prune obsolete patches 2025-08-25 15:26:06 +02:00