1
Fork 0
mirror of https://https.git.savannah.gnu.org/git/guix.git/ synced 2025-07-16 03:50:45 +02:00

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
This commit is contained in:
Ian Eure 2025-04-07 16:56:58 -07:00
parent d629fdc031
commit f30dccbb1a
No known key found for this signature in database
GPG key ID: 8499AC88F1A71CF2

View file

@ -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