Merge pull request #172710 from mweinelt/firefox-buildsymbols

main
Martin Weinelt 2 years ago committed by GitHub
commit 9b7c14d908
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 23
      pkgs/applications/networking/browsers/firefox/common.nix
  2. 46
      pkgs/development/tools/dump_syms/default.nix
  3. 2
      pkgs/top-level/all-packages.nix

@ -23,6 +23,7 @@
# build time
, autoconf
, cargo
, dump_syms
, makeWrapper
, nodejs
, perl
@ -168,6 +169,11 @@ buildStdenv.mkDerivation ({
inherit src unpackPhase meta;
outputs = [
"out"
"symbols"
];
# Add another configure-build-profiling run before the final configure phase if we build with pgo
preConfigurePhases = lib.optionals pgoSupport [
"configurePhase"
@ -196,6 +202,7 @@ buildStdenv.mkDerivation ({
nativeBuildInputs = [
autoconf
cargo
dump_syms
llvmPackages.llvm # llvm-objdump
makeWrapper
nodejs
@ -231,13 +238,17 @@ buildStdenv.mkDerivation ({
# Set consistent remoting name to ensure wmclass matches with desktop file
export MOZ_APP_REMOTINGNAME="${binaryName}"
# Use our own python
export MACH_USE_SYSTEM_PYTHON=1
# AS=as in the environment causes build failure
# https://bugzilla.mozilla.org/show_bug.cgi?id=1497286
unset AS
'' + lib.optionalString (lib.versionAtLeast version "100.0") ''
# Use our own python
export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system
'' + lib.optionalString (lib.versionOlder version "100.0") ''
# Use our own python
export MACH_USE_SYSTEM_PYTHON=1
'' + lib.optionalString (lib.versionAtLeast version "95.0") ''
# RBox WASM Sandboxing
export WASM_CC=${pkgsCross.wasi32.stdenv.cc}/bin/${pkgsCross.wasi32.stdenv.cc.targetPrefix}cc
@ -408,7 +419,13 @@ buildStdenv.mkDerivation ({
# tests were disabled in configureFlags
doCheck = false;
# Generate build symbols once after the final build
# https://firefox-source-docs.mozilla.org/crash-reporting/uploading_symbol.html
preInstall = ''
./mach buildsymbols
mkdir -p $symbols/
cp mozobj/dist/*.crashreporter-symbols.zip $symbols/
cd mozobj
'';

@ -0,0 +1,46 @@
{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, openssl
}:
let
pname = "dump_syms";
version = "unstable-2022-05-05";
in
rustPlatform.buildRustPackage {
inherit pname version;
src = fetchFromGitHub {
owner = "mozilla";
repo = pname;
rev = "c2743d59b5aa321ade698f84b90f86b3d35a1b06";
hash = "sha256-hWK9KrYqbfrF8b7i33InlTa/XkoZs+h49kUsKeSaAok=";
};
cargoSha256 = "sha256:0vsr867nl156wpxpw01bv9fxsp6rhj9vvpz2i2yhx4kjgr1qk1kw";
nativeBuildInputs = [
pkg-config
];
buildInputs = [
openssl
];
checkFlags = [
# Disable tests that require network access
# ConnectError("dns error", Custom { kind: Uncategorized, error: "failed to lookup address information: Temporary failure in name resolution" })) }', src/windows/pdb.rs:725:56
"--skip windows::pdb::tests::test_ntdll"
"--skip windows::pdb::tests::test_oleaut32"
];
meta = with lib; {
changelog = "https://github.com/mozilla/dump_syms/releases/tag/v${version}";
description = "Command-line utility for parsing the debugging information the compiler provides in ELF or stand-alone PDB files";
license = licenses.asl20;
homepage = "https://github.com/mozilla/dump_syms/";
maintainers = with maintainers; [ hexa ];
};
}

@ -5313,6 +5313,8 @@ with pkgs;
autoreconfHook = buildPackages.autoreconfHook269;
};
dump_syms = callPackage ../development/tools/dump_syms { };
dumptorrent = callPackage ../tools/misc/dumptorrent { };
duo-unix = callPackage ../tools/security/duo-unix { };

Loading…
Cancel
Save