Subject: [PATCH v2] gnu: icecat: Remove compiler paths from about:buildconfig

From: Jakub Kądziołka <[email-masked]>
Date: Tue, 21 Jan 2020 18:37:11 +0100

* gnu/packages/gnuzilla.scm
  (icecat)[arguments](dont-store-compiler-paths): New phase.
---
 gnu/packages/gnuzilla.scm | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index ae0c58eedb..d32333ca96 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2018 Ricardo Wurmus <[email-masked]>
 ;;; Copyright © 2019 Ivan Petkov <[email-masked]>
 ;;; Copyright © 2020 Oleg Pykhalov <[email-masked]>
+;;; Copyright © 2020 Jakub Kądziołka <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -906,6 +907,16 @@ from forcing GEXP-PROMISE."
                                       "-p1" "--input" file))))
                          (or native-inputs inputs)))
              #t))
+         (add-after 'unpack 'dont-store-compiler-paths
+           (lambda _
+             ;; Remove references to the compilers used from the output. Reduces
+             ;; `guix size icecat' by 1 GiB on x86-64.
+             (let ((zap "Store reference removed"))
+               (substitute* "toolkit/content/buildconfig.html"
+                 (("@CC@") zap)
+                 (("@CXX@") zap)
+                 (("@RUSTC@") zap)
+                 (("@MOZ_CONFIGURE_OPTIONS@") zap)))))
          (add-after 'apply-guix-specific-patches 'remove-bundled-libraries
            (lambda _
              ;; Remove bundled libraries that we don't use, since they may
-- 
2.25.0