Merge pull request #266750 from NixOS/backport-266735-to-release-23.05

[Backport release-23.05] Firefox 120.0b9 and buildMozillaMach include path hack for dbus-1
This commit is contained in:
Martin Weinelt
2023-11-13 02:02:04 +01:00
committed by GitHub
4 changed files with 84 additions and 6 deletions

View File

@@ -27,7 +27,6 @@
# build time
, autoconf
, cargo
, dump_syms
, makeWrapper
, mimalloc
@@ -37,7 +36,8 @@
, pkgsCross # wasm32 rlbox
, python3
, runCommand
, rustc
, rustPackages_1_69
, rustPackages_1_70
, rust-cbindgen
, rustPlatform
, unzip
@@ -147,6 +147,13 @@ assert pipewireSupport -> !waylandSupport || !webrtcSupport -> throw "${pname}:
let
inherit (lib) enableFeature;
rustPackages = if lib.versionAtLeast version "120" then
rustPackages_1_70
else
rustPackages_1_69;
inherit (rustPackages) cargo rustc;
# Target the LLVM version that rustc is built with for LTO.
llvmPackages0 = rustc.llvmPackages;
llvmPackagesBuildBuild0 = pkgsBuildBuild.rustc.llvmPackages;
@@ -490,6 +497,9 @@ buildStdenv.mkDerivation ({
preBuild = ''
cd mozobj
'' + lib.optionalString (lib.versionAtLeast version "120") ''
# https://bugzilla.mozilla.org/show_bug.cgi?id=1864083
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config dbus-1 --cflags)"
'';
postBuild = ''

View File

@@ -29,11 +29,11 @@
firefox-beta = buildMozillaMach rec {
pname = "firefox-beta";
version = "119.0b9";
version = "120.0b9";
applicationName = "Mozilla Firefox Beta";
src = fetchurl {
url = "mirror://mozilla/firefox/releases/${version}/source/firefox-${version}.source.tar.xz";
sha512 = "11d07474e3ca72a4e2f60053882e09a215e0d29d6830d0cd41447bb67370118356090af7adcbacd7703ad9fcdda83c9f909419c86b8f3bf2eacd9ca3d3aa3f54";
sha512 = "7ac5562ce393ea84663eac5c6ee1a0ca527ff4a8a9ec6aaaef37213ff071076846949e80af21d95ec8e32d3cbc740b772a9d7cc54965b7bbc8e015da22ae927f";
};
meta = {
@@ -56,12 +56,12 @@
firefox-devedition = (buildMozillaMach rec {
pname = "firefox-devedition";
version = "119.0b9";
version = "120.0b9";
applicationName = "Mozilla Firefox Developer Edition";
branding = "browser/branding/aurora";
src = fetchurl {
url = "mirror://mozilla/devedition/releases/${version}/source/firefox-${version}.source.tar.xz";
sha512 = "ce3e2adb3171aa05c7af3b7a4ea25eaafbc109c522b90e26aad577192a0902000fb7d705fa5707a9a7d0be2ab1c0cddc5a98abbe6549e1377c0a1d765bda62eb";
sha512 = "07bf1a58550e70c683719adef55fa3d1ee06876e0cb086c28242879c683269c4aa784b1dce639218b3ad24a546192088fe5224a52e13a0086f205ec5470e2428";
};
meta = {

View File

@@ -0,0 +1,63 @@
# New rust versions should first go to staging.
# Things to check after updating:
# 1. Rustc should produce rust binaries on x86_64-linux, aarch64-linux and x86_64-darwin:
# i.e. nix-shell -p fd or @GrahamcOfBorg build fd on github
# This testing can be also done by other volunteers as part of the pull
# request review, in case platforms cannot be covered.
# 2. The LLVM version used for building should match with rust upstream.
# Check the version number in the src/llvm-project git submodule in:
# https://github.com/rust-lang/rust/blob/<version-tag>/.gitmodules
# 3. Firefox and Thunderbird should still build on x86_64-linux.
{ stdenv, lib
, buildPackages
, newScope, callPackage
, CoreFoundation, Security, SystemConfiguration
, pkgsBuildTarget, pkgsBuildBuild, pkgsBuildHost
, makeRustPlatform
, llvmPackages_11
, llvmPackages_15, llvm_15
} @ args:
import ./default.nix {
rustcVersion = "1.70.0";
rustcSha256 = "sha256-sr+uAAt6UEDk7Eu8UKCfIVSBkMt1cLDtdzWDaEE70nw=";
llvmSharedForBuild = pkgsBuildBuild.llvmPackages_15.libllvm.override { enableSharedLibraries = true; };
llvmSharedForHost = pkgsBuildHost.llvmPackages_15.libllvm.override { enableSharedLibraries = true; };
llvmSharedForTarget = pkgsBuildTarget.llvmPackages_15.libllvm.override { enableSharedLibraries = true; };
llvmBootstrapForDarwin = llvmPackages_11;
# For use at runtime
llvmShared = llvm_15.override { enableSharedLibraries = true; };
# Expose llvmPackages used for rustc from rustc via passthru for LTO in Firefox
llvmPackages = llvmPackages_15;
# Note: the version MUST be one version prior to the version we're
# building
bootstrapVersion = "1.69.0";
# fetch hashes by running `print-hashes.sh ${bootstrapVersion}`
bootstrapHashes = {
i686-unknown-linux-gnu = "08b2b4f58c0861f40ae159c39cc12f6d41b6858e04a43c6c0aeb36707e2971d0";
x86_64-unknown-linux-gnu = "2ca4a306047c0b8b4029c382910fcbc895badc29680e0332c9df990fd1c70d4f";
x86_64-unknown-linux-musl = "071cb04819b15d8801584a1395b28d0472ce99c0e716296e3c0bb4e6318cf171";
arm-unknown-linux-gnueabihf = "64c82735b4e5606af61be0d01317da436a9590b969e503cdbd19e24636e15845";
armv7-unknown-linux-gnueabihf = "a509f02d910041c97847e2ccc4ee908c761b7dc5b3c4715922d2b1c573a09675";
aarch64-unknown-linux-gnu = "88af5aa7a40c8f1b40416a1f27de8ffbe09c155d933f69d3e109c0ccee92353b";
aarch64-unknown-linux-musl = "76aaf3e4fd7b552feb2d70752c43896a960a2a7c940002f58a5c3f03d2b3c862";
x86_64-apple-darwin = "9818dab2c3726d63dfbfde12c9273e62e484ef6d6f6e05a6431a3e089c335454";
aarch64-apple-darwin = "36228cac303298243fb84235db87a5ecf2af49db28585a82af091caefd598677";
powerpc64le-unknown-linux-gnu = "8ef68b77971c079dbe23b54a2cfb52da012873d96399c424bc223635306e9a58";
riscv64gc-unknown-linux-gnu = "e1976bf7d0edb7e7789a1ad7ff8086fdb5306a932650fa8182a5d009883fa6c5";
mips64el-unknown-linux-gnuabi64 = "c4bf3043451d6122a3845db825cbe35b5ca61a44659a00004f6cca1299ad9d72";
};
selectRustPackage = pkgs: pkgs.rust_1_70;
rustcPatches = [ ];
}
(builtins.removeAttrs args [ "pkgsBuildHost" "llvmPackages_11" "llvmPackages_15" "llvm_15"])

View File

@@ -16319,6 +16319,10 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) CoreFoundation Security SystemConfiguration;
llvm_15 = llvmPackages_15.libllvm;
};
rust_1_70 = callPackage ../development/compilers/rust/1_70.nix {
inherit (darwin.apple_sdk.frameworks) CoreFoundation Security SystemConfiguration;
llvm_15 = llvmPackages_15.libllvm;
};
rust = rust_1_69;
mrustc = callPackage ../development/compilers/mrustc { };
@@ -16328,6 +16332,7 @@ with pkgs;
};
rustPackages_1_69 = rust_1_69.packages.stable;
rustPackages_1_70 = rust_1_70.packages.stable;
rustPackages = rustPackages_1_69;
inherit (rustPackages) cargo cargo-auditable cargo-auditable-cargo-wrapper clippy rustc rustPlatform;