about summary refs log tree commit diff
path: root/pkgs/applications/networking/browsers/firefox/common.nix
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2022-05-15 07:08:19 +0200
committerJan Tojnar <jtojnar@gmail.com>2022-05-15 07:08:29 +0200
commitd1b77f990ff0933c167ead787253b4a7120d62bd (patch)
treee9b80ba583105fd0addf222e9f6eb1a5d69beb3f /pkgs/applications/networking/browsers/firefox/common.nix
parentcd6eea51c4159e1653b8e16e1b400e8b192de48f (diff)
parent826104819b3255d25a0e845c49f78fa72483d701 (diff)
Merge branch 'staging-next' into staging
Conflicts:
	pkgs/applications/networking/browsers/firefox/common.nix between f6c57619358d51e71a5298503c84e1c1ce4f9f12 and a373324120a271fdbff202b61895e06aecf98923.
Diffstat (limited to 'pkgs/applications/networking/browsers/firefox/common.nix')
-rw-r--r--pkgs/applications/networking/browsers/firefox/common.nix23
1 files changed, 20 insertions, 3 deletions
diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix
index 948adc407d7eb..252e55f248276 100644
--- a/pkgs/applications/networking/browsers/firefox/common.nix
+++ b/pkgs/applications/networking/browsers/firefox/common.nix
@@ -23,6 +23,7 @@
 # build time
 , autoconf
 , cargo
+, dump_syms
 , makeWrapper
 , nodejs
 , perl
@@ -174,6 +175,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"
@@ -206,6 +212,7 @@ buildStdenv.mkDerivation ({
   nativeBuildInputs = [
     autoconf
     cargo
+    dump_syms
     gnum4
     llvmPackagesBuildBuild.bintools
     makeWrapper
@@ -242,13 +249,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
@@ -424,7 +435,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
   '';