ieure pushed a commit to branch master
in repository guix.

commit f30dccbb1a6c58835d33e2b3769671ee622c4f54
Author: Ian Eure <[email protected]>
AuthorDate: Mon Apr 7 16:56:58 2025 -0700

    gnu: librewolf: Move GNU Mozzarella config into one phase.
    
    * gnu/packages/librewolf.scm (librewolf): Move all Mozzarella-related 
changes
    into a new 'use-mozzarella phase, instead of splitting it into two others.
    
    Change-Id: Iba264d26a944bd83ebb31c0a952a757b0ed4e847
---
 gnu/packages/librewolf.scm | 64 ++++++++++++++++++++++------------------------
 1 file changed, 30 insertions(+), 34 deletions(-)

diff --git a/gnu/packages/librewolf.scm b/gnu/packages/librewolf.scm
index 00085eacea..6d10b8e52d 100644
--- a/gnu/packages/librewolf.scm
+++ b/gnu/packages/librewolf.scm
@@ -322,6 +322,35 @@
               (substitute* "lw/librewolf.cfg"
                 (("defaultPref\\(\"browser\\.ml\\.")
                  "lockPref(\"browser.ml."))))
+          (add-after 'unpack 'use-mozzarella
+            (lambda _
+              (substitute*
+                  "toolkit/locales/en-US/toolkit/about/aboutAddons.ftl"
+                (("addons.mozilla.org")
+                 "gnuzilla.gnu.org"))
+              (call-with-port (open-file "lw/librewolf.cfg" "a")
+                (lambda (port)
+                  ;; Add-ons panel (see settings.js in Icecat source).
+                  (for-each
+                   (lambda (pref)
+                     (format port
+                             "defaultPref(~s, ~s);~%"
+                             (car pref)
+                             (cdr pref)))
+                   `(("extensions.getAddons.search.browseURL"
+                      ,(string-append
+                        "https://gnuzilla.gnu.org/mozzarella/";
+                        "search.php?q=%TERMS%"))
+                     ("extensions.getAddons.get.url" .
+                      "https://gnuzilla.gnu.org/mozzarella";)
+                     ("extensions.getAddons.link.url" .
+                      "https://gnuzilla.gnu.org/mozzarella";)
+                     ("extensions.getAddons.discovery.api_url" .
+                      "https://gnuzilla.gnu.org/mozzarella";)
+                     ("extensions.getAddons.langpacks.url" .
+                      "https://gnuzilla.gnu.org/mozzarella";)
+                     ("lightweightThemes.getMoreURL" .
+                      "https://gnuzilla.gnu.org/mozzarella";)))))))
           (add-after 'patch-source-shebangs 'patch-cargo-checksums
             (lambda _
               (use-modules (guix build cargo-utils))
@@ -476,12 +505,6 @@
                      "mk_add_options MOZ_TELEMETRY_REPORTING=0")))
                 (setenv "MOZCONFIG" mozconfig))
               (invoke "./mach" "configure")))
-          (add-before 'build 'fix-addons-placeholder
-            (lambda _
-              (substitute* 
-                  "toolkit/locales/en-US/toolkit/about/aboutAddons.ftl"
-                (("addons.mozilla.org")
-                 "gnuzilla.gnu.org"))))
           (replace 'build
             (lambda* (#:key (make-flags '())
                       (parallel-build? #t) #:allow-other-keys)
@@ -543,34 +566,7 @@
                 ;; Default is 5.
                 (substitute* (in-vicinity lib config-file)
                   (("defaultPref\\(\"extensions.enabledScopes\", 5\\)")
-                   "defaultPref(\"extensions.enabledScopes\", 13)"))
-                ;; Use Mozzarella addons repo.
-                (call-with-port
-                    (open-file
-                     (in-vicinity lib config-file)
-                     "a")
-                  (lambda (port)
-                    ;; Add-ons panel (see settings.js in Icecat source).
-                    (for-each
-                     (lambda (pref)
-                       (format port
-                               "defaultPref(~s, ~s);~%"
-                               (car pref)
-                               (cdr pref)))
-                     `(("extensions.getAddons.search.browseURL"
-                        ,(string-append
-                          "https://gnuzilla.gnu.org/mozzarella/";
-                          "search.php?q=%TERMS%"))
-                       ("extensions.getAddons.get.url" .
-                        "https://gnuzilla.gnu.org/mozzarella";)
-                       ("extensions.getAddons.link.url" .
-                        "https://gnuzilla.gnu.org/mozzarella";)
-                       ("extensions.getAddons.discovery.api_url" .
-                        "https://gnuzilla.gnu.org/mozzarella";)
-                       ("extensions.getAddons.langpacks.url" .
-                        "https://gnuzilla.gnu.org/mozzarella";)
-                       ("lightweightThemes.getMoreURL" .
-                        "https://gnuzilla.gnu.org/mozzarella";))))))))
+                   "defaultPref(\"extensions.enabledScopes\", 13)")))))
           (add-after 'install 'wrap-program
             (lambda* (#:key inputs outputs #:allow-other-keys)
               ;; The following two functions are from Guix's icecat package in

Reply via email to