git.iko.soy/typeable/nixpkgs
on master help sign in
firefox: Remove about:buildconfig

Storing the build configuration caused Firefox to retain a dependency on gcc, glibc.dev and icu4c.dev. This reduces the size of the firefox closure from 587 to 415 MiB.

commitc03326445b067dca37ea323d998ffa3d520adb6d authorEelco Dolstra <edolstra@gmail.com> dateTue 26 Sep 2017, 22:37 (9 years ago) parent3ad8cc1
3 files changed+33−4
pkgs/applications/networking/browsers/firefox/no-buildconfig.patch+25 pkgs/applications/networking/browsers/firefox/packages.nix+6−4 pkgs/applications/networking/browsers/firefox/wrapper.nix+2
pkgs/applications/networking/browsers/firefox/no-buildconfig.patchnew file+25
@@ -0,0 +1,25 @@
1+diff -ru -x '*~' firefox-55.0.3-orig/docshell/base/nsAboutRedirector.cpp firefox-55.0.3/docshell/base/nsAboutRedirector.cpp
2+--- firefox-55.0.3-orig/docshell/base/nsAboutRedirector.cpp 2017-07-31 18:20:51.000000000 +0200
3++++ firefox-55.0.3/docshell/base/nsAboutRedirector.cpp 2017-09-26 22:02:00.814151731 +0200
4+@@ -40,10 +40,6 @@
5+ nsIAboutModule::ALLOW_SCRIPT
6+ },
7+ {
8+- "buildconfig", "chrome://global/content/buildconfig.html",
9+- nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT
10+- },
11+- {
12+ "checkerboard", "chrome://global/content/aboutCheckerboard.xhtml",
13+ nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
14+ nsIAboutModule::ALLOW_SCRIPT
15+diff -ru -x '*~' firefox-55.0.3-orig/toolkit/content/jar.mn firefox-55.0.3/toolkit/content/jar.mn
16+--- firefox-55.0.3-orig/toolkit/content/jar.mn 2017-07-31 18:20:52.000000000 +0200
17++++ firefox-55.0.3/toolkit/content/jar.mn 2017-09-26 22:01:42.383350314 +0200
18+@@ -40,7 +40,6 @@
19+ content/global/plugins.css
20+ content/global/browser-child.js
21+ content/global/browser-content.js
22+-* content/global/buildconfig.html
23+ content/global/contentAreaUtils.js
24+ #ifndef MOZ_FENNEC
25+ content/global/customizeToolbar.css
pkgs/applications/networking/browsers/firefox/packages.nix+6−4
@@ -12,10 +12,12 @@ rec {
1212 sha512 = "3cacc87b97871f3a8c5e97c17ef7025079cb5c81f32377d9402cdad45815ac6c4c4762c79187f1e477910161c2377c42d41de62a50b6741d5d7c1cd70e8c6416";
1313 };
1414
15− patches = lib.optional stdenv.isi686 (fetchpatch {
16− url = "https://hg.mozilla.org/mozilla-central/raw-rev/15517c5a5d37";
17− sha256 = "1ba487p3hk4w2w7qqfxgv1y57vp86b8g3xhav2j20qd3j3phbbn7";
18− });
15+ patches =
16+ [ ./no-buildconfig.patch ]
17+ ++ lib.optional stdenv.isi686 (fetchpatch {
18+ url = "https://hg.mozilla.org/mozilla-central/raw-rev/15517c5a5d37";
19+ sha256 = "1ba487p3hk4w2w7qqfxgv1y57vp86b8g3xhav2j20qd3j3phbbn7";
20+ });
1921
2022 meta = {
2123 description = "A web browser built from Firefox source tree";
pkgs/applications/networking/browsers/firefox/wrapper.nix+2
@@ -129,6 +129,8 @@ in stdenv.mkDerivation {
129129
130130 passthru = { unwrapped = browser; };
131131
132+ disallowedRequisites = [ stdenv.cc ];
133+
132134 meta = browser.meta // {
133135 description =
134136 browser.meta.description