unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jakub Kądziołka" <kuba@kadziolka.net>
To: 39146@debbugs.gnu.org
Cc: Mark H Weaver <mhw@netris.org>,
	Marius Bakke <mbakke@fastmail.com>,
	Tobias Geerinckx-Rice <me@tobias.gr>,
	Danny Milosavljevic <dannym@scratchpost.org>
Subject: [bug#39146] [PATCH v4] gnu: icecat: Remove about:buildconfig store references.
Date: Thu, 13 Feb 2020 23:03:07 +0100	[thread overview]
Message-ID: <20200213220307.24701-1-kuba@kadziolka.net> (raw)
In-Reply-To: <20200212194525.joyg66cikh5xfnuu@gravity>

* gnu/packages/gnuzilla.scm (icecat)[arguments]:
  New ‘neutralise-store-references’ phase.

Co-authored-by: Tobias Geerinckx-Rice <me@tobias.gr>
---
Changes from the previous version:
- use regexp-quote around %store-directory, since today's IRC discussion
  has made me aware that this exists as a built-in
- reflow some lines

 gnu/packages/gnuzilla.scm | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index ae0c58eedb..fe6664e909 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -7,10 +7,11 @@
 ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2017 ng0 <ng0@n0.is>
-;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017, 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2019 Ivan Petkov <ivanppetkov@gmail.com>
 ;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
+;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -882,6 +883,7 @@ from forcing GEXP-PROMISE."
 
        #:modules ((ice-9 ftw)
                   (ice-9 rdelim)
+                  (ice-9 regex)
                   (ice-9 match)
                   (srfi srfi-34)
                   (srfi srfi-35)
@@ -1067,6 +1069,20 @@ 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"
+               (((format #f "(~a/)([0-9a-df-np-sv-z]{32})"
+                         (regexp-quote (%store-directory)))
+                 _ store hash)
+                (string-append store
+                               (string-take hash 8)
+                               "<!-- Guix: not a runtime dependency -->"
+                               (string-drop hash 8))))
+             #t))
          (add-before 'configure 'install-desktop-entry
            (lambda* (#:key outputs #:allow-other-keys)
              ;; Install the '.desktop' file.
-- 
2.25.0

  reply	other threads:[~2020-02-13 22:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-15 22:21 [bug#39146] [PATCH] gnu: icecat: Remove compiler paths from about:buildconfig Jakub Kądziołka
2020-01-21 17:37 ` [bug#39146] [PATCH v2] " Jakub Kądziołka
2020-01-21 17:52   ` Danny Milosavljevic
2020-01-22 21:23     ` Mark H Weaver
2020-01-23  8:37       ` Jakub Kądziołka
2020-01-24  2:53         ` Mark H Weaver
2020-02-10 18:38           ` Jakub Kądziołka
2020-02-10 20:24             ` Mark H Weaver
2020-02-10 21:49             ` Tobias Geerinckx-Rice via Guix-patches via
2020-02-12 19:45               ` [bug#39146] [PATCH v3] gnu: icecat: Remove about:buildconfig store references Jakub Kądziołka
2020-02-13 22:03                 ` Jakub Kądziołka [this message]
2020-01-21 18:05   ` [bug#39146] [PATCH v2] gnu: icecat: Remove compiler paths from about:buildconfig Tobias Geerinckx-Rice via Guix-patches via
2020-01-22  1:34 ` [bug#39146] [PATCH] gnu: icecat: Remove about:buildconfig store references Tobias Geerinckx-Rice via Guix-patches via
     [not found]   ` <20200122135107.73z6upacjwial3zq@zdrowyportier.kadziolka.net>
     [not found]     ` <87o8uvlgnn.fsf@nckx>
2020-01-22 14:39       ` Jakub Kądziołka
2020-01-22 20:13 ` [bug#39146] [PATCH v2] " Tobias Geerinckx-Rice via Guix-patches via
2020-01-22 20:28   ` Marius Bakke
2020-01-22 20:50   ` Jakub Kądziołka
2020-02-26 21:33 ` bug#39146: Done: " Jakub Kądziołka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200213220307.24701-1-kuba@kadziolka.net \
    --to=kuba@kadziolka.net \
    --cc=39146@debbugs.gnu.org \
    --cc=dannym@scratchpost.org \
    --cc=mbakke@fastmail.com \
    --cc=me@tobias.gr \
    --cc=mhw@netris.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).