[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#39146] [PATCH] gnu: icecat: Remove about:buildconfig store referenc
From: |
Tobias Geerinckx-Rice |
Subject: |
[bug#39146] [PATCH] gnu: icecat: Remove about:buildconfig store references. |
Date: |
Wed, 22 Jan 2020 02:34:06 +0100 |
* gnu/packages/gnuzilla.scm (icecat)[arguments]:
New ‘neutralise-store-references’ phase.
Reported-by: Jakub Kądziołka <address@hidden>
---
Jakub, IceCats,
What do you think of this attempt at robustness? Any drawbacks I've missed?
Kind regards,
T G-R
gnu/packages/gnuzilla.scm | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index ae0c58eedb..d4a793971c 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -11,6 +11,7 @@
;;; Copyright © 2018 Ricardo Wurmus <address@hidden>
;;; Copyright © 2019 Ivan Petkov <address@hidden>
;;; Copyright © 2020 Oleg Pykhalov <address@hidden>
+;;; Copyright © 2020 Jakub Kądziołka <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1067,6 +1068,15 @@ from forcing GEXP-PROMISE."
(force-output)
(retry (- remaining-attempts 1))))
(apply build args)))))))
+ (add-after 'build 'neutralise-store-references
+ (lambda _
+ ;; Mangle the store references to compilers & other build tools in
+ ;; about:buildconfig, reducing IceCat's closure by 1 GiB on
x86-64.
+ (substitute*
+ "dist/bin/chrome/toolkit/content/global/buildconfig.html"
+ (("(/gnu/store/)([0-9a-z]{32})" all store hash)
+ (string-append store (string-take hash 8) "…")))
+ #t))
(add-before 'configure 'install-desktop-entry
(lambda* (#:key outputs #:allow-other-keys)
;; Install the '.desktop' file.
--
2.23.0
[bug#39146] [PATCH] gnu: icecat: Remove about:buildconfig store references.,
Tobias Geerinckx-Rice <=
[bug#39146] [PATCH v2] gnu: icecat: Remove about:buildconfig store references., Tobias Geerinckx-Rice, 2020/01/22