all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#71832] [PATCH 0/2] Add nss-latest; updte Librewolf to 127.0.2-2.
@ 2024-06-29  3:57 Ian Eure
  2024-06-29  3:59 ` [bug#71832] [PATCH 1/2] gnu: Add nss-latest Ian Eure
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Ian Eure @ 2024-06-29  3:57 UTC (permalink / raw)
  To: 71832; +Cc: Ian Eure

This patch series begins implementing my proposal for nss[1], by adding
nss-latest (at version 3.101).  When the next ESR is out, I’ll update and
ungraft the other nss, as proposed.

It also updates Librewolf to 127.0.2-2, the latest version.  Librewolf 127.x
requires nss >= 3.100, so both patches are combined in this series.  LW also
builds with Rust 1.77 now, since that’s the new minimum version (and the
default version used by upstream Firefox builds).

[1]: https://lists.gnu.org/archive/html/guix-devel/2024-06/msg00318.html

Ian Eure (2):
  gnu: Add nss-latest.
  gnu: librewolf: Update to 127.0.2-1.

 gnu/packages/librewolf.scm | 1039 ++++++++++++++++++------------------
 gnu/packages/nss.scm       |   67 ++-
 2 files changed, 587 insertions(+), 519 deletions(-)

-- 
2.45.1





^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#71832] [PATCH 1/2] gnu: Add nss-latest.
  2024-06-29  3:57 [bug#71832] [PATCH 0/2] Add nss-latest; updte Librewolf to 127.0.2-2 Ian Eure
@ 2024-06-29  3:59 ` Ian Eure
  2024-06-29  3:59   ` [bug#71832] [PATCH 2/2] gnu: librewolf: Update to 127.0.2-1 Ian Eure
  2024-06-29 17:22 ` [bug#71832] [PATCH v2 0/2] Add nss-latest; update Librewolf to 127.0.2-2 Ian Eure
  2024-07-02  0:21 ` [bug#71832] [PATCH v3 0/2] Add nss-rapid; updte Librewolf to 127.0.2-2 Ian Eure
  2 siblings, 1 reply; 9+ messages in thread
From: Ian Eure @ 2024-06-29  3:59 UTC (permalink / raw)
  To: 71832; +Cc: Ian Eure

* gnu/packages/nss.scm (nss-latest): New variable.

Change-Id: Ifdc215090a20dee1bde83013852ef21b6cfd9979
---
 gnu/packages/nss.scm | 67 ++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 61 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm
index d558079f44..6b45e59ea8 100644
--- a/gnu/packages/nss.scm
+++ b/gnu/packages/nss.scm
@@ -106,6 +106,9 @@ (define-public nspr-4.32
               (base32
                "0v3zds1id71j5a5si42a658fjz8nv2f6zp6w4gqrqmdr6ksz8sxv"))))))
 
+;; nss should track ESRs, but currently doesn't.  When the next ESR it out, it
+;; should get updated.
+
 (define-public nss
   (package
     (name "nss")
@@ -153,13 +156,13 @@ (define-public nss
                 ;; Ensure we are building for the (%current-target-system).
                 #$@(if (%current-target-system)
                        #~((string-append
-                            "OS_TEST="
-                            (string-take #$(%current-target-system)
-                                         (string-index #$(%current-target-system) #\-)))
+                           "OS_TEST="
+                           (string-take #$(%current-target-system)
+                                        (string-index #$(%current-target-system) #\-)))
                           (string-append
-                            "KERNEL=" (cond (#$(target-hurd?) "gnu")
-                                            (#$(target-linux?) "linux")
-                                            (else ""))))
+                           "KERNEL=" (cond (#$(target-hurd?) "gnu")
+                                           (#$(target-linux?) "linux")
+                                           (else ""))))
                        #~())
                 #$@(if (%current-target-system)
                        #~("CROSS_COMPILE=1")
@@ -303,6 +306,58 @@ (define-public nss/fixed
                          (invoke "faketime" "2024-01-23" "./nss/tests/all.sh"))
                        (format #t "test suite not run~%"))))))))))))
 
+;; nss-latest tracks the latest released version.
+
+(define-public nss-latest
+  (package
+   (inherit nss)
+   (name "nss-latest")
+   (version "3.101")
+   (source (origin
+             (inherit (package-source nss))
+             (uri (let ((version-with-underscores
+                         (string-join (string-split version #\.) "_")))
+                    (string-append
+                     "https://ftp.mozilla.org/pub/mozilla.org/security/nss/"
+                     "releases/NSS_" version-with-underscores "_RTM/src/"
+                     "nss-" version ".tar.gz")))
+             (sha256
+              (base32
+               "1rw5xpclsy174znvxcb4d4zgjwadxy45mbh0wvkm3fxpnkq4i5w5"))))
+   (arguments
+    (substitute-keyword-arguments (package-arguments nss)
+      ((#:phases phases)
+       #~(modify-phases #$phases
+           (replace 'check
+             (lambda* (#:key tests? #:allow-other-keys)
+               (if tests?
+                   (begin
+                     ;; Use 127.0.0.1 instead of $HOST.$DOMSUF as HOSTADDR for
+                     ;; testing.  The latter requires a working DNS or /etc/hosts.
+                     (setenv "DOMSUF" "localdomain")
+                     (setenv "USE_IP" "TRUE")
+                     (setenv "IP_ADDRESS" "127.0.0.1")
+
+                     ;; This specific test is looking at performance "now
+                     ;; verify that we can quickly dump a database", and
+                     ;; we're not testing performance here (especially
+                     ;; since we're using faketime), so raise the
+                     ;; threshold
+                     (substitute* "nss/tests/dbtests/dbtests.sh"
+                       ((" -lt 5") " -lt 50"))
+
+                     ;; Since the test suite is very lengthy, run the test
+                     ;; suite once, not thrice as done by default, by
+                     ;; selecting only the 'standard' cycle.
+                     (setenv "NSS_CYCLES" "standard")
+
+                     ;; The "PayPalEE.cert" certificate expires every six months,
+                     ;; leading to test failures:
+                     ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=609734>.  To
+                     ;; work around that, set the time to roughly the release date.
+                     (invoke "faketime" "2024-01-23" "./nss/tests/all.sh"))
+                   (format #t "test suite not run~%"))))))))))
+
 (define-public nsncd
   (package
     (name "nsncd")
-- 
2.45.1





^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#71832] [PATCH 2/2] gnu: librewolf: Update to 127.0.2-1.
  2024-06-29  3:59 ` [bug#71832] [PATCH 1/2] gnu: Add nss-latest Ian Eure
@ 2024-06-29  3:59   ` Ian Eure
  0 siblings, 0 replies; 9+ messages in thread
From: Ian Eure @ 2024-06-29  3:59 UTC (permalink / raw)
  To: 71832; +Cc: Ian Eure

* gnu/packages/librewolf.scm (librewolf): Update to 127.0.2-1.  Reorganize
module to improve usability and reduce duplication.  The Rust package and
build ID are now at the top of the file.  The librewolf-source variable has
been replaced with the make-librewolf-source procedure, centralizing versions
& hashes in the librewolf package definition.  Dedent some of the package’s
arguments to improve readability.

Change-Id: I15f8a2aa1fae07e0497ab5511d10af0c1f70cc2e
---
 gnu/packages/librewolf.scm | 1039 ++++++++++++++++++------------------
 1 file changed, 526 insertions(+), 513 deletions(-)

diff --git a/gnu/packages/librewolf.scm b/gnu/packages/librewolf.scm
index c84bcaf3ce..7f8579e8dd 100644
--- a/gnu/packages/librewolf.scm
+++ b/gnu/packages/librewolf.scm
@@ -93,6 +93,18 @@ (define-module (gnu packages librewolf)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xorg))
 
+;; Define the versions of rust needed to build librewolf, trying to match
+;; upstream.  See the file taskcluster/kinds/toolchain/rust.yml at
+;; https://searchfox.org under the particular firefox release, like
+;; mozilla-esr102.
+;; 1.75 is the default in Guix, 1.77 is the minimum for Librewolf.
+(define rust-librewolf rust-1.77)
+
+;; Update this id with every update to its release date.
+;; It's used for cache validation and therefore can lead to strange bugs.
+;; ex: date '+%Y%m%d%H%M%S'
+(define %librewolf-build-id "20240626133423")
+
 (define (firefox-source-origin version hash)
   (origin
     (method url-fetch)
@@ -114,11 +126,14 @@ (define (librewolf-source-origin version hash)
 
 (define computed-origin-method (@@ (guix packages) computed-origin-method))
 
-(define librewolf-source
-  (let* ((ff-src (firefox-source-origin "126.0.1" "0fr679rcwshwpfxidc55b2xsn4pmrr7p9ix4rr2mv2k7kwsjcc7n"))
-         (version "126.0.1-1")
-         (lw-src (librewolf-source-origin version "0cac80073vkzd85ai9rbnwixs1h9bpy4dj2ri6jxdlqsy5d663km")))
-
+(define* (make-librewolf-source version #:key firefox-hash librewolf-hash)
+  (let* ((ff-src (firefox-source-origin
+                  (car (string-split version #\-))
+                  firefox-hash))
+         (version version)
+         (lw-src (librewolf-source-origin
+                  version
+                  librewolf-hash)))
     (origin
       (method computed-origin-method)
       (file-name (string-append "librewolf-" version ".source.tar.gz"))
@@ -204,523 +219,521 @@ (define librewolf-source
                                          ".source.tar.gz")
                           #$output))))))))
 
-;; Define the versions of rust needed to build librewolf, trying to match
-;; upstream.  See the file taskcluster/ci/toolchain/rust.yml at
-;; https://searchfox.org under the particular firefox release, like
-;; mozilla-esr102.
-(define rust-librewolf rust) ; 1.75 is the default in Guix, 1.65 is the minimum.
-
-;; Update this id with every update to its release date.
-;; It's used for cache validation and therefore can lead to strange bugs.
-;; ex: date '+%Y%m%d%H%M%S'
-(define %librewolf-build-id "20240607212143")
-
 (define-public librewolf
-  (package
-    (name "librewolf")
-    (version "126.0.1-1")
-    (source librewolf-source)
-    (build-system gnu-build-system)
-    (arguments
-     (list
-      #:configure-flags #~(let ((clang #$(this-package-native-input "clang")))
-                            `("--enable-application=browser"
-
-                              ;; Configuration
-                              "--without-wasm-sandboxed-libraries"
-                              "--with-system-jpeg"
-                              "--with-system-zlib"
-                              "--with-system-png"
-                              "--with-system-webp"
-                              "--with-system-icu"
-                              "--with-system-libvpx"
-                              "--with-system-libevent"
-                              "--with-system-ffi"
-                              "--enable-system-pixman"
-                              "--enable-jemalloc"
-
-                              ;; see https://bugs.gnu.org/32833
-                              "--with-system-nspr"
-                              "--with-system-nss"
-
-                              ,(string-append "--with-clang-path=" clang
-                                              "/bin/clang")
-                              ,(string-append "--with-libclang-path=" clang
-                                              "/lib")
-
-                              ;; Distribution
-                              "--with-distribution-id=org.guix"
-                              "--with-app-name=librewolf"
-                              "--with-app-basename=LibreWolf"
-                              "--with-branding=browser/branding/librewolf"
-
-                              ;; Features
-                              "--disable-tests"
-                              "--disable-updater"
-                              "--enable-pulseaudio"
-                              "--disable-crashreporter"
-                              "--allow-addon-sideload"
-                              "--with-unsigned-addon-scopes=app,system"
-                              "--disable-eme"
-
-                              ;; Build details
-                              "--disable-debug"
-                              "--enable-rust-simd"
-                              "--enable-release"
-                              "--enable-optimize"
-                              "--enable-strip"
-                              "--enable-hardening"
-                              "--disable-elf-hack"))
-      #:imported-modules %cargo-utils-modules
-      #:modules `((ice-9 regex)
-                  (ice-9 string-fun)
-                  (ice-9 ftw)
-                  (srfi srfi-1)
-                  (srfi srfi-26)
-                  (rnrs bytevectors)
-                  (rnrs io ports)
-                  (guix elf)
-                  (guix build gremlin)
-                  ,@%gnu-build-system-modules)
-      #:phases #~(modify-phases %standard-phases
-                   (add-after 'unpack 'fix-preferences
-                     (lambda* (#:key inputs #:allow-other-keys)
-                       (let ((port (open-file "browser/app/profile/firefox.js"
-                                    "a")))
-                         (define (write-setting key value)
-                           (format port "~%pref(\"~a\", ~a);~%" key value)
-                           (format #t
+  (let ((version "127.0.2-2"))
+    (package
+      (name "librewolf")
+      (version version)
+      (source (make-librewolf-source
+               version
+               #:firefox-hash
+               "1s73fdp7k60058ylyvlixq13k5hfbmj6k1y42fmzqlpg7n62lyqb"
+               #:librewolf-hash
+               "1f4xz496x1nf7lmvk50hakj9p6q0kzxl5f9s2k0b6kczvyc8gw5n"))
+
+      (build-system gnu-build-system)
+      (arguments
+       (list
+        #:configure-flags
+        #~(let ((clang #$(this-package-native-input "clang")))
+            `("--enable-application=browser"
+
+              ;; Configuration
+              "--without-wasm-sandboxed-libraries"
+              "--with-system-jpeg"
+              "--with-system-zlib"
+              "--with-system-png"
+              "--with-system-webp"
+              "--with-system-icu"
+              "--with-system-libvpx"
+              "--with-system-libevent"
+              "--with-system-ffi"
+              "--enable-system-pixman"
+              "--enable-jemalloc"
+
+              ;; see https://bugs.gnu.org/32833
+              "--with-system-nspr"
+              "--with-system-nss"
+
+              ,(string-append "--with-clang-path=" clang
+                              "/bin/clang")
+              ,(string-append "--with-libclang-path=" clang
+                              "/lib")
+
+              ;; Distribution
+              "--with-distribution-id=org.guix"
+              "--with-app-name=librewolf"
+              "--with-app-basename=LibreWolf"
+              "--with-branding=browser/branding/librewolf"
+
+              ;; Features
+              "--disable-tests"
+              "--disable-updater"
+              "--enable-pulseaudio"
+              "--disable-crashreporter"
+              "--allow-addon-sideload"
+              "--with-unsigned-addon-scopes=app,system"
+              "--disable-eme"
+
+              ;; Build details
+              "--disable-debug"
+              "--enable-rust-simd"
+              "--enable-release"
+              "--enable-optimize"
+              "--enable-strip"
+              "--enable-hardening"
+              "--disable-elf-hack"))
+        #:imported-modules %cargo-utils-modules
+        #:modules `((ice-9 regex)
+                    (ice-9 string-fun)
+                    (ice-9 ftw)
+                    (srfi srfi-1)
+                    (srfi srfi-26)
+                    (rnrs bytevectors)
+                    (rnrs io ports)
+                    (guix elf)
+                    (guix build gremlin)
+                    ,@%gnu-build-system-modules)
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'fix-preferences
+              (lambda* (#:key inputs #:allow-other-keys)
+                (let ((port (open-file "browser/app/profile/firefox.js"
+                                       "a")))
+                  (define (write-setting key value)
+                    (format port "~%pref(\"~a\", ~a);~%" key value)
+                    (format #t
                             "fix-preferences: setting value of ~a to ~a~%" key
                             value))
 
-                         ;; We should allow the sandbox to read the store directory,
-                         ;; because the sandbox has access to /usr on FHS distros.
-                         (write-setting
-                          "security.sandbox.content.read_path_whitelist"
-                          (string-append "\""
-                                         (%store-directory) "/\""))
-
-                         ;; XDG settings should be managed by Guix.
-                         (write-setting "browser.shell.checkDefaultBrowser"
-                                        "false")
-                         (close-port port))))
-                   (add-after 'fix-preferences 'fix-ffmpeg-runtime-linker
-                     (lambda* (#:key inputs #:allow-other-keys)
-                       (let* ((ffmpeg (assoc-ref inputs "ffmpeg"))
-                              (libavcodec (string-append ffmpeg
-                                                         "/lib/libavcodec.so")))
-                         ;; Arrange to load libavcodec.so by its absolute file name.
-                         (substitute* "dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp"
-                           (("libavcodec\\.so")
-                            libavcodec)))))
-                   (add-after 'patch-source-shebangs 'patch-cargo-checksums
-                     (lambda _
-                       (use-modules (guix build cargo-utils))
-                       (let ((null-hash
-                              ;; This is the SHA256 output of an empty string.
-                              (string-append
-                               "e3b0c44298fc1c149afbf4c8996fb924"
-                               "27ae41e4649b934ca495991b7852b855")))
-                         (for-each (lambda (file)
-                                     (format #t
+                  ;; We should allow the sandbox to read the store directory,
+                  ;; because the sandbox has access to /usr on FHS distros.
+                  (write-setting
+                   "security.sandbox.content.read_path_whitelist"
+                   (string-append "\""
+                                  (%store-directory) "/\""))
+
+                  ;; XDG settings should be managed by Guix.
+                  (write-setting "browser.shell.checkDefaultBrowser"
+                                 "false")
+                  (close-port port))))
+            (add-after 'fix-preferences 'fix-ffmpeg-runtime-linker
+              (lambda* (#:key inputs #:allow-other-keys)
+                (let* ((ffmpeg (assoc-ref inputs "ffmpeg"))
+                       (libavcodec (string-append ffmpeg
+                                                  "/lib/libavcodec.so")))
+                  ;; Arrange to load libavcodec.so by its absolute file name.
+                  (substitute* "dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp"
+                    (("libavcodec\\.so")
+                     libavcodec)))))
+            (add-after 'patch-source-shebangs 'patch-cargo-checksums
+              (lambda _
+                (use-modules (guix build cargo-utils))
+                (let ((null-hash
+                       ;; This is the SHA256 output of an empty string.
+                       (string-append
+                        "e3b0c44298fc1c149afbf4c8996fb924"
+                        "27ae41e4649b934ca495991b7852b855")))
+                  (for-each (lambda (file)
+                              (format #t
                                       "patch-cargo-checksums: patching checksums in ~a~%"
                                       file)
-                                     (substitute* file
-                                       (("(checksum = )\".*\"" all name)
-                                        (string-append name "\"" null-hash
-                                                       "\""))))
-                                   (find-files "." "Cargo\\.lock$"))
-                         (for-each generate-all-checksums
-                                   '("build"
-                                     "dom/media"
-                                     "dom/webauthn"
-                                     "gfx"
-                                     "intl"
-                                     "js"
-                                     "media"
-                                     "modules"
-                                     "mozglue/static/rust"
-                                     "netwerk"
-                                     "remote"
-                                     "security/manager/ssl"
-                                     "servo"
-                                     "storage"
-                                     "third_party/rust"
-                                     "toolkit"
-                                     "xpcom/rust"
-                                     "services")))))
-                   (add-after 'patch-cargo-checksums 'remove-cargo-frozen-flag
-                     (lambda _
-                       ;; Remove --frozen flag from cargo invokation, otherwise it'll
-                       ;; complain that it's not able to change Cargo.lock.
-                       ;; https://bugzilla.mozilla.org/show_bug.cgi?id=1726373
-                       (substitute* "build/RunCbindgen.py"
-                         (("args.append\\(\"--frozen\"\\)") "pass"))))
-                   (delete 'bootstrap)
-                   (add-before 'configure 'patch-SpeechDispatcherService.cpp
-                     (lambda _
-                       (let* ((lib "libspeechd.so.2")
-                              (file (string-append
-                                     "dom/media/webspeech/synth/"
-                                     "speechd/SpeechDispatcherService.cpp"))
-                              (old-content (call-with-input-file file
-                                             get-string-all)))
-                         (substitute
-                          file
-                          `((,(format #f "~s" lib) unquote
-                             (lambda (line _)
-                               (string-replace-substring
-                                line lib
-                                (string-append #$speech-dispatcher
-                                               "/lib/" lib))))))
-                         (if (string=? old-content
-                                       (call-with-input-file file
-                                         get-string-all))
-                             (error
-                              "substitute did nothing, phase requires an update")))))
-                   (add-before 'configure 'set-build-id
-                     ;; Build will write the timestamp to output, which is harmful
-                     ;; for reproducibility, so change it to a fixed date.  Use a
-                     ;; separate phase for easier modification with inherit.
-                     (lambda _
-                       (setenv "MOZ_BUILD_DATE"
-                               #$%librewolf-build-id)))
-                   (replace 'configure
-                     (lambda* (#:key inputs outputs configure-flags
-                               #:allow-other-keys)
-                       (setenv "AUTOCONF"
-                               (string-append (assoc-ref inputs "autoconf")
-                                              "/bin/autoconf"))
-                       (setenv "SHELL"
-                               (which "bash"))
-                       (setenv "CONFIG_SHELL"
-                               (which "bash"))
-                       (setenv "MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE"
-                               "system")
-                       ;; This should use the host info probably (does it
-                       ;; build on non-x86_64 though?)
-                       (setenv "GUIX_PYTHONPATH"
-                               (string-append (getcwd)
-                                "/obj-x86_64-pc-linux-gnu/_virtualenvs/build"))
-
-                       ;; Use Clang, Clang is 2x faster than GCC
-                       (setenv "AR" "llvm-ar")
-                       (setenv "NM" "llvm-nm")
-                       (setenv "CC" "clang")
-                       (setenv "CXX" "clang++")
-                       (setenv "MOZ_NOSPAM" "1")
-                       (setenv "MOZ_APP_NAME" "librewolf")
-
-                       (setenv "MOZBUILD_STATE_PATH"
-                               (getcwd))
-
-                       (let* ((mozconfig (string-append (getcwd) "/mozconfig"))
-                              (out (assoc-ref outputs "out"))
-                              (flags (cons (string-append "--prefix=" out)
-                                           configure-flags)))
-                         (format #t "build directory: ~s~%"
-                                 (getcwd))
-                         (format #t "configure flags: ~s~%" flags)
-
-                         (define write-flags
-                           (lambda flags
-                             (display (string-join (map (cut string-append
-                                                         "ac_add_options " <>)
-                                                        flags) "\n"))
-                             (display "\n")))
-                         (with-output-to-file mozconfig
-                           (lambda ()
-                             (apply write-flags flags)
-                             ;; The following option unsets Telemetry
-                             ;; Reporting. With the Addons Fiasco,
-                             ;; Mozilla was found to be collecting
-                             ;; user's data, including saved passwords
-                             ;; and web form data, without users
-                             ;; consent. Mozilla was also found
-                             ;; shipping updates to systems without
-                             ;; the user's knowledge or permission.
-                             ;; As a result of this, use the following
-                             ;; command to permanently disable
-                             ;; telemetry reporting.
-                             (display "unset MOZ_TELEMETRY_REPORTING\n")
-                             (display "mk_add_options MOZ_CRASHREPORTER=0\n")
-                             (display "mk_add_options MOZ_DATA_REPORTING=0\n")
-                             (display
-                              "mk_add_options MOZ_SERVICES_HEALTHREPORT=0")
-                             (display
-                              "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)
-                       (apply invoke "./mach" "build"
-                              ;; mach will use parallel build if possible by default
-                              `(,@(if parallel-build?
-                                      '()
-                                      '("-j1")) ,@make-flags))))
-                   (add-after 'build 'neutralise-store-references
-                     (lambda _
-                       ;; Mangle the store references to compilers &
-                       ;; other build tools in about:buildconfig,
-                       ;; reducing the package's closure by 1 GiB on
-                       ;; x86-64.
-                       (let* ((build-dir (car (scandir "."
-                                                       (cut string-prefix?
-                                                            "obj-" <>))))
-                              (file (string-append build-dir
-                                     "/dist/bin/chrome/toolkit/"
-                                     "content/global/buildconfig.html")))
-                         (substitute* file
-                           (((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)))))))
-                   (replace 'install
-                     (lambda _
-                       (invoke "./mach" "install")))
-                   (add-after 'install 'remove-duplicate-bin
-                     (lambda* (#:key outputs #:allow-other-keys)
-                       (delete-file (string-append #$output
-                                     "/lib/librewolf/librewolf-bin"))))
-                   (add-after 'install 'wrap-glxtest
-                     ;; glxtest uses dlopen() to load mesa and pci
-                     ;; libs, wrap it to set LD_LIBRARY_PATH.
-                     (lambda* (#:key inputs outputs #:allow-other-keys)
-                       (let* ((out (assoc-ref outputs "out"))
-                              (lib (string-append out "/lib"))
-                              (libs (map
-                                     (lambda (lib-name)
-                                       (string-append (assoc-ref inputs
-                                                                 lib-name)
-                                                      "/lib"))
-                                     '("mesa" "pciutils"))))
-                         (wrap-program (car (find-files lib "^glxtest$"))
-                           `("LD_LIBRARY_PATH" prefix ,libs)))))
-                   (add-after 'install 'patch-config
-                     (lambda* (#:key inputs #:allow-other-keys)
-                       (let ((lib (string-append #$output "/lib/librewolf"))
-                             (config-file "librewolf.cfg"))
-
-                         ;; Required for Guix packaged extensions
-                         ;; SCOPE_PROFILE=1, SCOPE_APPLICATION=4, SCOPE_SYSTEM=8
-                         ;; 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"))))))))
-                   (add-after 'install 'wrap-program
-                     (lambda* (#:key inputs outputs #:allow-other-keys)
-                       ;; The following two functions are from Guix's icecat package in
-                       ;; (gnu packages gnuzilla).  See commit
-                       ;; b7a0935420ee630a29b7e5ac73a32ba1eb24f00b.
-                       (define (runpath-of lib)
-                         (call-with-input-file lib
-                           (compose elf-dynamic-info-runpath elf-dynamic-info
-                                    parse-elf get-bytevector-all)))
-                       (define (runpaths-of-input label)
-                         (let* ((dir (string-append (assoc-ref inputs label)
-                                                    "/lib"))
-                                (libs (find-files dir "\\.so$")))
-                           (append-map runpath-of libs)))
-                       (let* ((out (assoc-ref outputs "out"))
-                              (lib (string-append out "/lib"))
-                              (libs (map
-                                     (lambda (lib-name)
-                                       (string-append (assoc-ref inputs
-                                                                 lib-name)
-                                                      "/lib"))
-                                     '("mesa" "libpng-apng" "libnotify" "libva"
-                                       "pulseaudio" "gtk+" "pipewire"
-                                       ;; For U2F and WebAuthn
-                                       "eudev")))
-
-                              ;; VA-API is run in the RDD (Remote Data Decoder) sandbox
-                              ;; and must be explicitly given access to files it needs.
-                              ;; Rather than adding the whole store (as Nix had
-                              ;; upstream do, see
-                              ;; <https://github.com/NixOS/nixpkgs/pull/165964> and
-                              ;; linked upstream patches), we can just follow the
-                              ;; runpaths of the needed libraries to add everything to
-                              ;; LD_LIBRARY_PATH.  These will then be accessible in the
-                              ;; RDD sandbox.
-                              (rdd-whitelist (map (cut string-append <> "/")
-                                                  (delete-duplicates (append-map
-                                                                      runpaths-of-input
-                                                                      '("mesa"
-                                                                        "ffmpeg")))))
-                              (gtk-share (string-append (assoc-ref inputs
-                                                                   "gtk+")
-                                                        "/share")))
-                         (wrap-program (car (find-files lib "^librewolf$"))
-                           `("LD_LIBRARY_PATH" prefix
-                             (,@libs ,@rdd-whitelist))
-                           `("XDG_DATA_DIRS" prefix
-                             (,gtk-share))
-                           `("MOZ_LEGACY_PROFILES" =
-                             ("1"))
-                           `("MOZ_ALLOW_DOWNGRADE" =
-                             ("1"))))))
-                   (add-after 'wrap-program 'install-desktop-entry
-                     (lambda* (#:key outputs #:allow-other-keys)
-                       (let* ((desktop-file
-                               "taskcluster/docker/firefox-snap/firefox.desktop")
-                              (applications (string-append #$output
-                                             "/share/applications")))
-                         (substitute* desktop-file
-                           (("^Exec=firefox")
-                            (string-append "Exec="
-                                           #$output "/bin/librewolf"))
-                           ;; "Firefox" -> "LibreWolf" everywhere
-                           (("Firefox")
-                            "LibreWolf")
-                           ;; Remove non-Latin translations.
-                           (("^Name\\[(ar|bn)\\].*$")
-                            "")
-                           (("^Icon=.*")
-                            (string-append "Icon="
-                             #$output
-                             "/share/icons/hicolor/128x128/apps/librewolf.png
+                              (substitute* file
+                                (("(checksum = )\".*\"" all name)
+                                 (string-append name "\"" null-hash
+                                                "\""))))
+                            (find-files "." "Cargo\\.lock$"))
+                  (for-each generate-all-checksums
+                            '("build"
+                              "dom/media"
+                              "dom/webauthn"
+                              "gfx"
+                              "intl"
+                              "js"
+                              "media"
+                              "modules"
+                              "mozglue/static/rust"
+                              "netwerk"
+                              "remote"
+                              "security/manager/ssl"
+                              "servo"
+                              "storage"
+                              "third_party/rust"
+                              "toolkit"
+                              "xpcom/rust"
+                              "services")))))
+            (add-after 'patch-cargo-checksums 'remove-cargo-frozen-flag
+              (lambda _
+                ;; Remove --frozen flag from cargo invokation, otherwise it'll
+                ;; complain that it's not able to change Cargo.lock.
+                ;; https://bugzilla.mozilla.org/show_bug.cgi?id=1726373
+                (substitute* "build/RunCbindgen.py"
+                  (("args.append\\(\"--frozen\"\\)") "pass"))))
+            (delete 'bootstrap)
+            (add-before 'configure 'patch-SpeechDispatcherService.cpp
+              (lambda _
+                (let* ((lib "libspeechd.so.2")
+                       (file (string-append
+                              "dom/media/webspeech/synth/"
+                              "speechd/SpeechDispatcherService.cpp"))
+                       (old-content (call-with-input-file file
+                                      get-string-all)))
+                  (substitute
+                   file
+                   `((,(format #f "~s" lib) unquote
+                      (lambda (line _)
+                        (string-replace-substring
+                         line lib
+                         (string-append #$speech-dispatcher
+                                        "/lib/" lib))))))
+                  (if (string=? old-content
+                                (call-with-input-file file
+                                  get-string-all))
+                      (error
+                       "substitute did nothing, phase requires an update")))))
+            (add-before 'configure 'set-build-id
+              ;; Build will write the timestamp to output, which is harmful
+              ;; for reproducibility, so change it to a fixed date.  Use a
+              ;; separate phase for easier modification with inherit.
+              (lambda _
+                (setenv "MOZ_BUILD_DATE"
+                        #$%librewolf-build-id)))
+            (replace 'configure
+              (lambda* (#:key inputs outputs configure-flags
+                        #:allow-other-keys)
+                (setenv "AUTOCONF"
+                        (string-append (assoc-ref inputs "autoconf")
+                                       "/bin/autoconf"))
+                (setenv "SHELL"
+                        (which "bash"))
+                (setenv "CONFIG_SHELL"
+                        (which "bash"))
+                (setenv "MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE"
+                        "system")
+                ;; This should use the host info probably (does it
+                ;; build on non-x86_64 though?)
+                (setenv "GUIX_PYTHONPATH"
+                        (string-append (getcwd)
+                                       "/obj-x86_64-pc-linux-gnu/_virtualenvs/build"))
+
+                ;; Use Clang, Clang is 2x faster than GCC
+                (setenv "AR" "llvm-ar")
+                (setenv "NM" "llvm-nm")
+                (setenv "CC" "clang")
+                (setenv "CXX" "clang++")
+                (setenv "MOZ_NOSPAM" "1")
+                (setenv "MOZ_APP_NAME" "librewolf")
+
+                (setenv "MOZBUILD_STATE_PATH"
+                        (getcwd))
+
+                (let* ((mozconfig (string-append (getcwd) "/mozconfig"))
+                       (out (assoc-ref outputs "out"))
+                       (flags (cons (string-append "--prefix=" out)
+                                    configure-flags)))
+                  (format #t "build directory: ~s~%"
+                          (getcwd))
+                  (format #t "configure flags: ~s~%" flags)
+
+                  (define write-flags
+                    (lambda flags
+                      (display (string-join (map (cut string-append
+                                                      "ac_add_options " <>)
+                                                 flags) "\n"))
+                      (display "\n")))
+                  (with-output-to-file mozconfig
+                    (lambda ()
+                      (apply write-flags flags)
+                      ;; The following option unsets Telemetry
+                      ;; Reporting. With the Addons Fiasco,
+                      ;; Mozilla was found to be collecting
+                      ;; user's data, including saved passwords
+                      ;; and web form data, without users
+                      ;; consent. Mozilla was also found
+                      ;; shipping updates to systems without
+                      ;; the user's knowledge or permission.
+                      ;; As a result of this, use the following
+                      ;; command to permanently disable
+                      ;; telemetry reporting.
+                      (display "unset MOZ_TELEMETRY_REPORTING\n")
+                      (display "mk_add_options MOZ_CRASHREPORTER=0\n")
+                      (display "mk_add_options MOZ_DATA_REPORTING=0\n")
+                      (display
+                       "mk_add_options MOZ_SERVICES_HEALTHREPORT=0")
+                      (display
+                       "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)
+                (apply invoke "./mach" "build"
+                       ;; mach will use parallel build if possible by default
+                       `(,@(if parallel-build?
+                               '()
+                               '("-j1")) ,@make-flags))))
+            (add-after 'build 'neutralise-store-references
+              (lambda _
+                ;; Mangle the store references to compilers &
+                ;; other build tools in about:buildconfig,
+                ;; reducing the package's closure by 1 GiB on
+                ;; x86-64.
+                (let* ((build-dir (car (scandir "."
+                                                (cut string-prefix?
+                                                     "obj-" <>))))
+                       (file (string-append build-dir
+                                            "/dist/bin/chrome/toolkit/"
+                                            "content/global/buildconfig.html")))
+                  (substitute* file
+                    (((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)))))))
+            (replace 'install
+              (lambda _
+                (invoke "./mach" "install")))
+            (add-after 'install 'remove-duplicate-bin
+              (lambda* (#:key outputs #:allow-other-keys)
+                (delete-file (string-append #$output
+                                            "/lib/librewolf/librewolf-bin"))))
+            (add-after 'install 'wrap-glxtest
+              ;; glxtest uses dlopen() to load mesa and pci
+              ;; libs, wrap it to set LD_LIBRARY_PATH.
+              (lambda* (#:key inputs outputs #:allow-other-keys)
+                (let* ((out (assoc-ref outputs "out"))
+                       (lib (string-append out "/lib"))
+                       (libs (map
+                              (lambda (lib-name)
+                                (string-append (assoc-ref inputs
+                                                          lib-name)
+                                               "/lib"))
+                              '("mesa" "pciutils"))))
+                  (wrap-program (car (find-files lib "^glxtest$"))
+                    `("LD_LIBRARY_PATH" prefix ,libs)))))
+            (add-after 'install 'patch-config
+              (lambda* (#:key inputs #:allow-other-keys)
+                (let ((lib (string-append #$output "/lib/librewolf"))
+                      (config-file "librewolf.cfg"))
+
+                  ;; Required for Guix packaged extensions
+                  ;; SCOPE_PROFILE=1, SCOPE_APPLICATION=4, SCOPE_SYSTEM=8
+                  ;; 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"))))))))
+            (add-after 'install 'wrap-program
+              (lambda* (#:key inputs outputs #:allow-other-keys)
+                ;; The following two functions are from Guix's icecat package in
+                ;; (gnu packages gnuzilla).  See commit
+                ;; b7a0935420ee630a29b7e5ac73a32ba1eb24f00b.
+                (define (runpath-of lib)
+                  (call-with-input-file lib
+                    (compose elf-dynamic-info-runpath elf-dynamic-info
+                             parse-elf get-bytevector-all)))
+                (define (runpaths-of-input label)
+                  (let* ((dir (string-append (assoc-ref inputs label)
+                                             "/lib"))
+                         (libs (find-files dir "\\.so$")))
+                    (append-map runpath-of libs)))
+                (let* ((out (assoc-ref outputs "out"))
+                       (lib (string-append out "/lib"))
+                       (libs (map
+                              (lambda (lib-name)
+                                (string-append (assoc-ref inputs
+                                                          lib-name)
+                                               "/lib"))
+                              '("mesa" "libpng-apng" "libnotify" "libva"
+                                "pulseaudio" "gtk+" "pipewire"
+                                ;; For U2F and WebAuthn
+                                "eudev")))
+
+                       ;; VA-API is run in the RDD (Remote Data Decoder) sandbox
+                       ;; and must be explicitly given access to files it needs.
+                       ;; Rather than adding the whole store (as Nix had
+                       ;; upstream do, see
+                       ;; <https://github.com/NixOS/nixpkgs/pull/165964> and
+                       ;; linked upstream patches), we can just follow the
+                       ;; runpaths of the needed libraries to add everything to
+                       ;; LD_LIBRARY_PATH.  These will then be accessible in the
+                       ;; RDD sandbox.
+                       (rdd-whitelist (map (cut string-append <> "/")
+                                           (delete-duplicates (append-map
+                                                               runpaths-of-input
+                                                               '("mesa"
+                                                                 "ffmpeg")))))
+                       (gtk-share (string-append (assoc-ref inputs
+                                                            "gtk+")
+                                                 "/share")))
+                  (wrap-program (car (find-files lib "^librewolf$"))
+                    `("LD_LIBRARY_PATH" prefix
+                      (,@libs ,@rdd-whitelist))
+                    `("XDG_DATA_DIRS" prefix
+                      (,gtk-share))
+                    `("MOZ_LEGACY_PROFILES" =
+                      ("1"))
+                    `("MOZ_ALLOW_DOWNGRADE" =
+                      ("1"))))))
+            (add-after 'wrap-program 'install-desktop-entry
+              (lambda* (#:key outputs #:allow-other-keys)
+                (let* ((desktop-file
+                        "taskcluster/docker/firefox-snap/firefox.desktop")
+                       (applications (string-append #$output
+                                                    "/share/applications")))
+                  (substitute* desktop-file
+                    (("^Exec=firefox")
+                     (string-append "Exec="
+                                    #$output "/bin/librewolf"))
+                    ;; "Firefox" -> "LibreWolf" everywhere
+                    (("Firefox")
+                     "LibreWolf")
+                    ;; Remove non-Latin translations.
+                    (("^Name\\[(ar|bn)\\].*$")
+                     "")
+                    (("^Icon=.*")
+                     (string-append "Icon="
+                                    #$output
+                                    "/share/icons/hicolor/128x128/apps/librewolf.png
 "))
-                           ;; These commands were changed.
-                           (("-NewWindow")
-                            "-new-window")
-                           (("-NewPrivateWindow")
-                            "-new-private-window")
-                           (("StartupNotify=true")
-                            "StartupNotify=true
+                    ;; These commands were changed.
+                    (("-NewWindow")
+                     "-new-window")
+                    (("-NewPrivateWindow")
+                     "-new-private-window")
+                    (("StartupNotify=true")
+                     "StartupNotify=true
 StartupWMClass=Navigator"))
-                         (copy-file desktop-file "librewolf.desktop")
-                         (install-file "librewolf.desktop" applications))))
-                   (add-after 'install-desktop-entry 'install-icons
-                     (lambda* (#:key outputs #:allow-other-keys)
-                       (let ((icon-source-dir (string-append #$output
-                                               "/lib/librewolf/browser/"
-                                               "chrome/icons/default")))
-                         (for-each (lambda (size)
-                                     (let ((dest (string-append #$output
-                                                  "/share/icons/hicolor/"
-                                                  size
-                                                  "x"
-                                                  size
-                                                  "/apps")))
-                                       (mkdir-p dest)
-                                       (symlink (string-append icon-source-dir
-                                                 "/default" size ".png")
-                                                (string-append dest
-                                                 "/librewolf.png"))))
-                                   '("16" "32" "48" "64" "128"))))))
-
-      ;; Test will significantly increase build time but with little rewards.
-      #:tests? #f
-
-      ;; WARNING: Parallel build will consume lots of memory!
-      ;; If you have encountered OOM issue in build phase, try disable it.
-      #:parallel-build? #t
-
-      ;; Some dynamic lib was determined at runtime, so rpath check may fail.
-      #:validate-runpath? #f))
-    (inputs (list bash-minimal
-                  bzip2
-                  cairo
-                  cups
-                  dbus-glib
-                  freetype
-                  ffmpeg
-                  gdk-pixbuf
-                  glib
-                  gtk+
-                  gtk+-2
-                  hunspell
-                  icu4c-73
-                  jemalloc
-                  libcanberra
-                  libevent
-                  libffi
-                  libgnome
-                  libjpeg-turbo
-                  libnotify
-                  libpng-apng
-                  libva
-                  libvpx
-                  libwebp
-                  libxcomposite
-                  libxft
-                  libxinerama
-                  libxscrnsaver
-                  libxt
-                  mesa
-                  mit-krb5
-                  nspr
-                  nss/fixed
-                  pango
-                  pciutils
-                  pipewire
-                  pixman
-                  pulseaudio
-                  speech-dispatcher
-                  sqlite
-                  startup-notification
-                  eudev
-                  unzip
-                  zip
-                  zlib))
-    (native-inputs (list alsa-lib
-                         autoconf-2.13
-                         `(,rust-librewolf "cargo")
-                         clang-18
-                         llvm-18
-                         m4
-                         nasm
-                         node-lts
-                         perl
-                         pkg-config
-                         python
-                         rust-librewolf
-                         rust-cbindgen-0.26
-                         which
-                         yasm))
-    (home-page "https://librewolf.net/")
-    (synopsis
-     "Custom version of Firefox, focused on privacy, security and freedom")
-    (description
-     "LibreWolf is designed to increase protection against tracking and
+                  (copy-file desktop-file "librewolf.desktop")
+                  (install-file "librewolf.desktop" applications))))
+            (add-after 'install-desktop-entry 'install-icons
+              (lambda* (#:key outputs #:allow-other-keys)
+                (let ((icon-source-dir (string-append #$output
+                                                      "/lib/librewolf/browser/"
+                                                      "chrome/icons/default")))
+                  (for-each (lambda (size)
+                              (let ((dest (string-append #$output
+                                                         "/share/icons/hicolor/"
+                                                         size
+                                                         "x"
+                                                         size
+                                                         "/apps")))
+                                (mkdir-p dest)
+                                (symlink (string-append icon-source-dir
+                                                        "/default" size ".png")
+                                         (string-append dest
+                                                        "/librewolf.png"))))
+                            '("16" "32" "48" "64" "128"))))))
+
+        ;; Test will significantly increase build time but with little rewards.
+        #:tests? #f
+
+        ;; WARNING: Parallel build will consume lots of memory!
+        ;; If you have encountered OOM issue in build phase, try disable it.
+        #:parallel-build? #t
+
+        ;; Some dynamic lib was determined at runtime, so rpath check may fail.
+        #:validate-runpath? #f))
+      (inputs (list bash-minimal
+                    bzip2
+                    cairo
+                    cups
+                    dbus-glib
+                    freetype
+                    ffmpeg
+                    gdk-pixbuf
+                    glib
+                    gtk+
+                    gtk+-2
+                    hunspell
+                    icu4c-73
+                    jemalloc
+                    libcanberra
+                    libevent
+                    libffi
+                    libgnome
+                    libjpeg-turbo
+                    libnotify
+                    libpng-apng
+                    libva
+                    libvpx
+                    libwebp
+                    libxcomposite
+                    libxft
+                    libxinerama
+                    libxscrnsaver
+                    libxt
+                    mesa
+                    mit-krb5
+                    nspr
+                    nss-latest
+                    pango
+                    pciutils
+                    pipewire
+                    pixman
+                    pulseaudio
+                    speech-dispatcher
+                    sqlite
+                    startup-notification
+                    eudev
+                    unzip
+                    zip
+                    zlib))
+      (native-inputs (list alsa-lib
+                           autoconf-2.13
+                           `(,rust-librewolf "cargo")
+                           clang-18
+                           llvm-18
+                           m4
+                           nasm
+                           node-lts
+                           perl
+                           pkg-config
+                           python
+                           rust-librewolf
+                           rust-cbindgen-0.26
+                           which
+                           yasm))
+      (home-page "https://librewolf.net/")
+      (synopsis
+       "Custom version of Firefox, focused on privacy, security and freedom")
+      (description
+       "LibreWolf is designed to increase protection against tracking and
 fingerprinting techniques, while also including a few security improvements.
 This is achieved through our privacy and security oriented settings and
 patches.  LibreWolf also aims to remove all the telemetry, data collection and
 annoyances, as well as disabling anti-freedom features like DRM.")
-    (license license:mpl2.0)))
+      (license license:mpl2.0))))
-- 
2.45.1





^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#71832] [PATCH v2 0/2] Add nss-latest; update Librewolf to 127.0.2-2
  2024-06-29  3:57 [bug#71832] [PATCH 0/2] Add nss-latest; updte Librewolf to 127.0.2-2 Ian Eure
  2024-06-29  3:59 ` [bug#71832] [PATCH 1/2] gnu: Add nss-latest Ian Eure
@ 2024-06-29 17:22 ` Ian Eure
  2024-06-29 17:22   ` [bug#71832] [PATCH v2 1/2] gnu: Add nss-latest Ian Eure
  2024-06-29 17:22   ` [bug#71832] [PATCH v2 2/2] gnu: librewolf: Update to 127.0.2-1 Ian Eure
  2024-07-02  0:21 ` [bug#71832] [PATCH v3 0/2] Add nss-rapid; updte Librewolf to 127.0.2-2 Ian Eure
  2 siblings, 2 replies; 9+ messages in thread
From: Ian Eure @ 2024-06-29 17:22 UTC (permalink / raw)
  To: 71832; +Cc: Ian Eure

Realized that I didn't remove the backout of the encoding_rs patch which was
added for 126.x.  The browser built and worked, but that change isn’t needed
anymore; remove it.

Ian Eure (2):
  gnu: Add nss-latest.
  gnu: librewolf: Update to 127.0.2-1.

 gnu/packages/librewolf.scm | 1044 ++++++++++++++++++------------------
 gnu/packages/nss.scm       |   67 ++-
 2 files changed, 587 insertions(+), 524 deletions(-)

-- 
2.45.1





^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#71832] [PATCH v2 1/2] gnu: Add nss-latest.
  2024-06-29 17:22 ` [bug#71832] [PATCH v2 0/2] Add nss-latest; update Librewolf to 127.0.2-2 Ian Eure
@ 2024-06-29 17:22   ` Ian Eure
  2024-06-29 17:22   ` [bug#71832] [PATCH v2 2/2] gnu: librewolf: Update to 127.0.2-1 Ian Eure
  1 sibling, 0 replies; 9+ messages in thread
From: Ian Eure @ 2024-06-29 17:22 UTC (permalink / raw)
  To: 71832; +Cc: Ian Eure

* gnu/packages/nss.scm (nss-latest): New variable.

Change-Id: Ifdc215090a20dee1bde83013852ef21b6cfd9979
---
 gnu/packages/nss.scm | 67 ++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 61 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm
index d558079f44..6b45e59ea8 100644
--- a/gnu/packages/nss.scm
+++ b/gnu/packages/nss.scm
@@ -106,6 +106,9 @@ (define-public nspr-4.32
               (base32
                "0v3zds1id71j5a5si42a658fjz8nv2f6zp6w4gqrqmdr6ksz8sxv"))))))
 
+;; nss should track ESRs, but currently doesn't.  When the next ESR it out, it
+;; should get updated.
+
 (define-public nss
   (package
     (name "nss")
@@ -153,13 +156,13 @@ (define-public nss
                 ;; Ensure we are building for the (%current-target-system).
                 #$@(if (%current-target-system)
                        #~((string-append
-                            "OS_TEST="
-                            (string-take #$(%current-target-system)
-                                         (string-index #$(%current-target-system) #\-)))
+                           "OS_TEST="
+                           (string-take #$(%current-target-system)
+                                        (string-index #$(%current-target-system) #\-)))
                           (string-append
-                            "KERNEL=" (cond (#$(target-hurd?) "gnu")
-                                            (#$(target-linux?) "linux")
-                                            (else ""))))
+                           "KERNEL=" (cond (#$(target-hurd?) "gnu")
+                                           (#$(target-linux?) "linux")
+                                           (else ""))))
                        #~())
                 #$@(if (%current-target-system)
                        #~("CROSS_COMPILE=1")
@@ -303,6 +306,58 @@ (define-public nss/fixed
                          (invoke "faketime" "2024-01-23" "./nss/tests/all.sh"))
                        (format #t "test suite not run~%"))))))))))))
 
+;; nss-latest tracks the latest released version.
+
+(define-public nss-latest
+  (package
+   (inherit nss)
+   (name "nss-latest")
+   (version "3.101")
+   (source (origin
+             (inherit (package-source nss))
+             (uri (let ((version-with-underscores
+                         (string-join (string-split version #\.) "_")))
+                    (string-append
+                     "https://ftp.mozilla.org/pub/mozilla.org/security/nss/"
+                     "releases/NSS_" version-with-underscores "_RTM/src/"
+                     "nss-" version ".tar.gz")))
+             (sha256
+              (base32
+               "1rw5xpclsy174znvxcb4d4zgjwadxy45mbh0wvkm3fxpnkq4i5w5"))))
+   (arguments
+    (substitute-keyword-arguments (package-arguments nss)
+      ((#:phases phases)
+       #~(modify-phases #$phases
+           (replace 'check
+             (lambda* (#:key tests? #:allow-other-keys)
+               (if tests?
+                   (begin
+                     ;; Use 127.0.0.1 instead of $HOST.$DOMSUF as HOSTADDR for
+                     ;; testing.  The latter requires a working DNS or /etc/hosts.
+                     (setenv "DOMSUF" "localdomain")
+                     (setenv "USE_IP" "TRUE")
+                     (setenv "IP_ADDRESS" "127.0.0.1")
+
+                     ;; This specific test is looking at performance "now
+                     ;; verify that we can quickly dump a database", and
+                     ;; we're not testing performance here (especially
+                     ;; since we're using faketime), so raise the
+                     ;; threshold
+                     (substitute* "nss/tests/dbtests/dbtests.sh"
+                       ((" -lt 5") " -lt 50"))
+
+                     ;; Since the test suite is very lengthy, run the test
+                     ;; suite once, not thrice as done by default, by
+                     ;; selecting only the 'standard' cycle.
+                     (setenv "NSS_CYCLES" "standard")
+
+                     ;; The "PayPalEE.cert" certificate expires every six months,
+                     ;; leading to test failures:
+                     ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=609734>.  To
+                     ;; work around that, set the time to roughly the release date.
+                     (invoke "faketime" "2024-01-23" "./nss/tests/all.sh"))
+                   (format #t "test suite not run~%"))))))))))
+
 (define-public nsncd
   (package
     (name "nsncd")
-- 
2.45.1





^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#71832] [PATCH v2 2/2] gnu: librewolf: Update to 127.0.2-1.
  2024-06-29 17:22 ` [bug#71832] [PATCH v2 0/2] Add nss-latest; update Librewolf to 127.0.2-2 Ian Eure
  2024-06-29 17:22   ` [bug#71832] [PATCH v2 1/2] gnu: Add nss-latest Ian Eure
@ 2024-06-29 17:22   ` Ian Eure
  1 sibling, 0 replies; 9+ messages in thread
From: Ian Eure @ 2024-06-29 17:22 UTC (permalink / raw)
  To: 71832; +Cc: Ian Eure

* gnu/packages/librewolf.scm (librewolf): Update to 127.0.2-1.  Reorganize
module to improve usability and reduce duplication.  The Rust package and
build ID are now at the top of the file.  The librewolf-source variable has
been replaced with the make-librewolf-source procedure, centralizing versions
& hashes in the librewolf package definition.  Dedent some of the package’s
arguments to improve readability.

Change-Id: I15f8a2aa1fae07e0497ab5511d10af0c1f70cc2e
---
 gnu/packages/librewolf.scm | 1044 ++++++++++++++++++------------------
 1 file changed, 526 insertions(+), 518 deletions(-)

diff --git a/gnu/packages/librewolf.scm b/gnu/packages/librewolf.scm
index c84bcaf3ce..a400080dcb 100644
--- a/gnu/packages/librewolf.scm
+++ b/gnu/packages/librewolf.scm
@@ -93,6 +93,18 @@ (define-module (gnu packages librewolf)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xorg))
 
+;; Define the versions of rust needed to build librewolf, trying to match
+;; upstream.  See the file taskcluster/kinds/toolchain/rust.yml at
+;; https://searchfox.org under the particular firefox release, like
+;; mozilla-esr102.
+;; 1.75 is the default in Guix, 1.77 is the minimum for Librewolf.
+(define rust-librewolf rust-1.77)
+
+;; Update this id with every update to its release date.
+;; It's used for cache validation and therefore can lead to strange bugs.
+;; ex: date '+%Y%m%d%H%M%S'
+(define %librewolf-build-id "20240626133423")
+
 (define (firefox-source-origin version hash)
   (origin
     (method url-fetch)
@@ -114,11 +126,14 @@ (define (librewolf-source-origin version hash)
 
 (define computed-origin-method (@@ (guix packages) computed-origin-method))
 
-(define librewolf-source
-  (let* ((ff-src (firefox-source-origin "126.0.1" "0fr679rcwshwpfxidc55b2xsn4pmrr7p9ix4rr2mv2k7kwsjcc7n"))
-         (version "126.0.1-1")
-         (lw-src (librewolf-source-origin version "0cac80073vkzd85ai9rbnwixs1h9bpy4dj2ri6jxdlqsy5d663km")))
-
+(define* (make-librewolf-source version #:key firefox-hash librewolf-hash)
+  (let* ((ff-src (firefox-source-origin
+                  (car (string-split version #\-))
+                  firefox-hash))
+         (version version)
+         (lw-src (librewolf-source-origin
+                  version
+                  librewolf-hash)))
     (origin
       (method computed-origin-method)
       (file-name (string-append "librewolf-" version ".source.tar.gz"))
@@ -162,11 +177,6 @@ (define librewolf-source
                  (("^ff_source_tarball:=.*")
                   (string-append "ff_source_tarball:=" #+ff-src)))
 
-               ;; Remove encoding_rs patch, it doesn't build with Rust 1.75.
-               (substitute* '("assets/patches.txt")
-                 (("patches/encoding_rs.patch\\\n$")
-                  ""))
-
                ;; Stage locales.
                (begin
                  (format #t "Staging locales...~%")
@@ -204,523 +214,521 @@ (define librewolf-source
                                          ".source.tar.gz")
                           #$output))))))))
 
-;; Define the versions of rust needed to build librewolf, trying to match
-;; upstream.  See the file taskcluster/ci/toolchain/rust.yml at
-;; https://searchfox.org under the particular firefox release, like
-;; mozilla-esr102.
-(define rust-librewolf rust) ; 1.75 is the default in Guix, 1.65 is the minimum.
-
-;; Update this id with every update to its release date.
-;; It's used for cache validation and therefore can lead to strange bugs.
-;; ex: date '+%Y%m%d%H%M%S'
-(define %librewolf-build-id "20240607212143")
-
 (define-public librewolf
-  (package
-    (name "librewolf")
-    (version "126.0.1-1")
-    (source librewolf-source)
-    (build-system gnu-build-system)
-    (arguments
-     (list
-      #:configure-flags #~(let ((clang #$(this-package-native-input "clang")))
-                            `("--enable-application=browser"
-
-                              ;; Configuration
-                              "--without-wasm-sandboxed-libraries"
-                              "--with-system-jpeg"
-                              "--with-system-zlib"
-                              "--with-system-png"
-                              "--with-system-webp"
-                              "--with-system-icu"
-                              "--with-system-libvpx"
-                              "--with-system-libevent"
-                              "--with-system-ffi"
-                              "--enable-system-pixman"
-                              "--enable-jemalloc"
-
-                              ;; see https://bugs.gnu.org/32833
-                              "--with-system-nspr"
-                              "--with-system-nss"
-
-                              ,(string-append "--with-clang-path=" clang
-                                              "/bin/clang")
-                              ,(string-append "--with-libclang-path=" clang
-                                              "/lib")
-
-                              ;; Distribution
-                              "--with-distribution-id=org.guix"
-                              "--with-app-name=librewolf"
-                              "--with-app-basename=LibreWolf"
-                              "--with-branding=browser/branding/librewolf"
-
-                              ;; Features
-                              "--disable-tests"
-                              "--disable-updater"
-                              "--enable-pulseaudio"
-                              "--disable-crashreporter"
-                              "--allow-addon-sideload"
-                              "--with-unsigned-addon-scopes=app,system"
-                              "--disable-eme"
-
-                              ;; Build details
-                              "--disable-debug"
-                              "--enable-rust-simd"
-                              "--enable-release"
-                              "--enable-optimize"
-                              "--enable-strip"
-                              "--enable-hardening"
-                              "--disable-elf-hack"))
-      #:imported-modules %cargo-utils-modules
-      #:modules `((ice-9 regex)
-                  (ice-9 string-fun)
-                  (ice-9 ftw)
-                  (srfi srfi-1)
-                  (srfi srfi-26)
-                  (rnrs bytevectors)
-                  (rnrs io ports)
-                  (guix elf)
-                  (guix build gremlin)
-                  ,@%gnu-build-system-modules)
-      #:phases #~(modify-phases %standard-phases
-                   (add-after 'unpack 'fix-preferences
-                     (lambda* (#:key inputs #:allow-other-keys)
-                       (let ((port (open-file "browser/app/profile/firefox.js"
-                                    "a")))
-                         (define (write-setting key value)
-                           (format port "~%pref(\"~a\", ~a);~%" key value)
-                           (format #t
+  (let ((version "127.0.2-2"))
+    (package
+      (name "librewolf")
+      (version version)
+      (source (make-librewolf-source
+               version
+               #:firefox-hash
+               "1s73fdp7k60058ylyvlixq13k5hfbmj6k1y42fmzqlpg7n62lyqb"
+               #:librewolf-hash
+               "1f4xz496x1nf7lmvk50hakj9p6q0kzxl5f9s2k0b6kczvyc8gw5n"))
+
+      (build-system gnu-build-system)
+      (arguments
+       (list
+        #:configure-flags
+        #~(let ((clang #$(this-package-native-input "clang")))
+            `("--enable-application=browser"
+
+              ;; Configuration
+              "--without-wasm-sandboxed-libraries"
+              "--with-system-jpeg"
+              "--with-system-zlib"
+              "--with-system-png"
+              "--with-system-webp"
+              "--with-system-icu"
+              "--with-system-libvpx"
+              "--with-system-libevent"
+              "--with-system-ffi"
+              "--enable-system-pixman"
+              "--enable-jemalloc"
+
+              ;; see https://bugs.gnu.org/32833
+              "--with-system-nspr"
+              "--with-system-nss"
+
+              ,(string-append "--with-clang-path=" clang
+                              "/bin/clang")
+              ,(string-append "--with-libclang-path=" clang
+                              "/lib")
+
+              ;; Distribution
+              "--with-distribution-id=org.guix"
+              "--with-app-name=librewolf"
+              "--with-app-basename=LibreWolf"
+              "--with-branding=browser/branding/librewolf"
+
+              ;; Features
+              "--disable-tests"
+              "--disable-updater"
+              "--enable-pulseaudio"
+              "--disable-crashreporter"
+              "--allow-addon-sideload"
+              "--with-unsigned-addon-scopes=app,system"
+              "--disable-eme"
+
+              ;; Build details
+              "--disable-debug"
+              "--enable-rust-simd"
+              "--enable-release"
+              "--enable-optimize"
+              "--enable-strip"
+              "--enable-hardening"
+              "--disable-elf-hack"))
+        #:imported-modules %cargo-utils-modules
+        #:modules `((ice-9 regex)
+                    (ice-9 string-fun)
+                    (ice-9 ftw)
+                    (srfi srfi-1)
+                    (srfi srfi-26)
+                    (rnrs bytevectors)
+                    (rnrs io ports)
+                    (guix elf)
+                    (guix build gremlin)
+                    ,@%gnu-build-system-modules)
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'fix-preferences
+              (lambda* (#:key inputs #:allow-other-keys)
+                (let ((port (open-file "browser/app/profile/firefox.js"
+                                       "a")))
+                  (define (write-setting key value)
+                    (format port "~%pref(\"~a\", ~a);~%" key value)
+                    (format #t
                             "fix-preferences: setting value of ~a to ~a~%" key
                             value))
 
-                         ;; We should allow the sandbox to read the store directory,
-                         ;; because the sandbox has access to /usr on FHS distros.
-                         (write-setting
-                          "security.sandbox.content.read_path_whitelist"
-                          (string-append "\""
-                                         (%store-directory) "/\""))
-
-                         ;; XDG settings should be managed by Guix.
-                         (write-setting "browser.shell.checkDefaultBrowser"
-                                        "false")
-                         (close-port port))))
-                   (add-after 'fix-preferences 'fix-ffmpeg-runtime-linker
-                     (lambda* (#:key inputs #:allow-other-keys)
-                       (let* ((ffmpeg (assoc-ref inputs "ffmpeg"))
-                              (libavcodec (string-append ffmpeg
-                                                         "/lib/libavcodec.so")))
-                         ;; Arrange to load libavcodec.so by its absolute file name.
-                         (substitute* "dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp"
-                           (("libavcodec\\.so")
-                            libavcodec)))))
-                   (add-after 'patch-source-shebangs 'patch-cargo-checksums
-                     (lambda _
-                       (use-modules (guix build cargo-utils))
-                       (let ((null-hash
-                              ;; This is the SHA256 output of an empty string.
-                              (string-append
-                               "e3b0c44298fc1c149afbf4c8996fb924"
-                               "27ae41e4649b934ca495991b7852b855")))
-                         (for-each (lambda (file)
-                                     (format #t
+                  ;; We should allow the sandbox to read the store directory,
+                  ;; because the sandbox has access to /usr on FHS distros.
+                  (write-setting
+                   "security.sandbox.content.read_path_whitelist"
+                   (string-append "\""
+                                  (%store-directory) "/\""))
+
+                  ;; XDG settings should be managed by Guix.
+                  (write-setting "browser.shell.checkDefaultBrowser"
+                                 "false")
+                  (close-port port))))
+            (add-after 'fix-preferences 'fix-ffmpeg-runtime-linker
+              (lambda* (#:key inputs #:allow-other-keys)
+                (let* ((ffmpeg (assoc-ref inputs "ffmpeg"))
+                       (libavcodec (string-append ffmpeg
+                                                  "/lib/libavcodec.so")))
+                  ;; Arrange to load libavcodec.so by its absolute file name.
+                  (substitute* "dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp"
+                    (("libavcodec\\.so")
+                     libavcodec)))))
+            (add-after 'patch-source-shebangs 'patch-cargo-checksums
+              (lambda _
+                (use-modules (guix build cargo-utils))
+                (let ((null-hash
+                       ;; This is the SHA256 output of an empty string.
+                       (string-append
+                        "e3b0c44298fc1c149afbf4c8996fb924"
+                        "27ae41e4649b934ca495991b7852b855")))
+                  (for-each (lambda (file)
+                              (format #t
                                       "patch-cargo-checksums: patching checksums in ~a~%"
                                       file)
-                                     (substitute* file
-                                       (("(checksum = )\".*\"" all name)
-                                        (string-append name "\"" null-hash
-                                                       "\""))))
-                                   (find-files "." "Cargo\\.lock$"))
-                         (for-each generate-all-checksums
-                                   '("build"
-                                     "dom/media"
-                                     "dom/webauthn"
-                                     "gfx"
-                                     "intl"
-                                     "js"
-                                     "media"
-                                     "modules"
-                                     "mozglue/static/rust"
-                                     "netwerk"
-                                     "remote"
-                                     "security/manager/ssl"
-                                     "servo"
-                                     "storage"
-                                     "third_party/rust"
-                                     "toolkit"
-                                     "xpcom/rust"
-                                     "services")))))
-                   (add-after 'patch-cargo-checksums 'remove-cargo-frozen-flag
-                     (lambda _
-                       ;; Remove --frozen flag from cargo invokation, otherwise it'll
-                       ;; complain that it's not able to change Cargo.lock.
-                       ;; https://bugzilla.mozilla.org/show_bug.cgi?id=1726373
-                       (substitute* "build/RunCbindgen.py"
-                         (("args.append\\(\"--frozen\"\\)") "pass"))))
-                   (delete 'bootstrap)
-                   (add-before 'configure 'patch-SpeechDispatcherService.cpp
-                     (lambda _
-                       (let* ((lib "libspeechd.so.2")
-                              (file (string-append
-                                     "dom/media/webspeech/synth/"
-                                     "speechd/SpeechDispatcherService.cpp"))
-                              (old-content (call-with-input-file file
-                                             get-string-all)))
-                         (substitute
-                          file
-                          `((,(format #f "~s" lib) unquote
-                             (lambda (line _)
-                               (string-replace-substring
-                                line lib
-                                (string-append #$speech-dispatcher
-                                               "/lib/" lib))))))
-                         (if (string=? old-content
-                                       (call-with-input-file file
-                                         get-string-all))
-                             (error
-                              "substitute did nothing, phase requires an update")))))
-                   (add-before 'configure 'set-build-id
-                     ;; Build will write the timestamp to output, which is harmful
-                     ;; for reproducibility, so change it to a fixed date.  Use a
-                     ;; separate phase for easier modification with inherit.
-                     (lambda _
-                       (setenv "MOZ_BUILD_DATE"
-                               #$%librewolf-build-id)))
-                   (replace 'configure
-                     (lambda* (#:key inputs outputs configure-flags
-                               #:allow-other-keys)
-                       (setenv "AUTOCONF"
-                               (string-append (assoc-ref inputs "autoconf")
-                                              "/bin/autoconf"))
-                       (setenv "SHELL"
-                               (which "bash"))
-                       (setenv "CONFIG_SHELL"
-                               (which "bash"))
-                       (setenv "MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE"
-                               "system")
-                       ;; This should use the host info probably (does it
-                       ;; build on non-x86_64 though?)
-                       (setenv "GUIX_PYTHONPATH"
-                               (string-append (getcwd)
-                                "/obj-x86_64-pc-linux-gnu/_virtualenvs/build"))
-
-                       ;; Use Clang, Clang is 2x faster than GCC
-                       (setenv "AR" "llvm-ar")
-                       (setenv "NM" "llvm-nm")
-                       (setenv "CC" "clang")
-                       (setenv "CXX" "clang++")
-                       (setenv "MOZ_NOSPAM" "1")
-                       (setenv "MOZ_APP_NAME" "librewolf")
-
-                       (setenv "MOZBUILD_STATE_PATH"
-                               (getcwd))
-
-                       (let* ((mozconfig (string-append (getcwd) "/mozconfig"))
-                              (out (assoc-ref outputs "out"))
-                              (flags (cons (string-append "--prefix=" out)
-                                           configure-flags)))
-                         (format #t "build directory: ~s~%"
-                                 (getcwd))
-                         (format #t "configure flags: ~s~%" flags)
-
-                         (define write-flags
-                           (lambda flags
-                             (display (string-join (map (cut string-append
-                                                         "ac_add_options " <>)
-                                                        flags) "\n"))
-                             (display "\n")))
-                         (with-output-to-file mozconfig
-                           (lambda ()
-                             (apply write-flags flags)
-                             ;; The following option unsets Telemetry
-                             ;; Reporting. With the Addons Fiasco,
-                             ;; Mozilla was found to be collecting
-                             ;; user's data, including saved passwords
-                             ;; and web form data, without users
-                             ;; consent. Mozilla was also found
-                             ;; shipping updates to systems without
-                             ;; the user's knowledge or permission.
-                             ;; As a result of this, use the following
-                             ;; command to permanently disable
-                             ;; telemetry reporting.
-                             (display "unset MOZ_TELEMETRY_REPORTING\n")
-                             (display "mk_add_options MOZ_CRASHREPORTER=0\n")
-                             (display "mk_add_options MOZ_DATA_REPORTING=0\n")
-                             (display
-                              "mk_add_options MOZ_SERVICES_HEALTHREPORT=0")
-                             (display
-                              "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)
-                       (apply invoke "./mach" "build"
-                              ;; mach will use parallel build if possible by default
-                              `(,@(if parallel-build?
-                                      '()
-                                      '("-j1")) ,@make-flags))))
-                   (add-after 'build 'neutralise-store-references
-                     (lambda _
-                       ;; Mangle the store references to compilers &
-                       ;; other build tools in about:buildconfig,
-                       ;; reducing the package's closure by 1 GiB on
-                       ;; x86-64.
-                       (let* ((build-dir (car (scandir "."
-                                                       (cut string-prefix?
-                                                            "obj-" <>))))
-                              (file (string-append build-dir
-                                     "/dist/bin/chrome/toolkit/"
-                                     "content/global/buildconfig.html")))
-                         (substitute* file
-                           (((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)))))))
-                   (replace 'install
-                     (lambda _
-                       (invoke "./mach" "install")))
-                   (add-after 'install 'remove-duplicate-bin
-                     (lambda* (#:key outputs #:allow-other-keys)
-                       (delete-file (string-append #$output
-                                     "/lib/librewolf/librewolf-bin"))))
-                   (add-after 'install 'wrap-glxtest
-                     ;; glxtest uses dlopen() to load mesa and pci
-                     ;; libs, wrap it to set LD_LIBRARY_PATH.
-                     (lambda* (#:key inputs outputs #:allow-other-keys)
-                       (let* ((out (assoc-ref outputs "out"))
-                              (lib (string-append out "/lib"))
-                              (libs (map
-                                     (lambda (lib-name)
-                                       (string-append (assoc-ref inputs
-                                                                 lib-name)
-                                                      "/lib"))
-                                     '("mesa" "pciutils"))))
-                         (wrap-program (car (find-files lib "^glxtest$"))
-                           `("LD_LIBRARY_PATH" prefix ,libs)))))
-                   (add-after 'install 'patch-config
-                     (lambda* (#:key inputs #:allow-other-keys)
-                       (let ((lib (string-append #$output "/lib/librewolf"))
-                             (config-file "librewolf.cfg"))
-
-                         ;; Required for Guix packaged extensions
-                         ;; SCOPE_PROFILE=1, SCOPE_APPLICATION=4, SCOPE_SYSTEM=8
-                         ;; 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"))))))))
-                   (add-after 'install 'wrap-program
-                     (lambda* (#:key inputs outputs #:allow-other-keys)
-                       ;; The following two functions are from Guix's icecat package in
-                       ;; (gnu packages gnuzilla).  See commit
-                       ;; b7a0935420ee630a29b7e5ac73a32ba1eb24f00b.
-                       (define (runpath-of lib)
-                         (call-with-input-file lib
-                           (compose elf-dynamic-info-runpath elf-dynamic-info
-                                    parse-elf get-bytevector-all)))
-                       (define (runpaths-of-input label)
-                         (let* ((dir (string-append (assoc-ref inputs label)
-                                                    "/lib"))
-                                (libs (find-files dir "\\.so$")))
-                           (append-map runpath-of libs)))
-                       (let* ((out (assoc-ref outputs "out"))
-                              (lib (string-append out "/lib"))
-                              (libs (map
-                                     (lambda (lib-name)
-                                       (string-append (assoc-ref inputs
-                                                                 lib-name)
-                                                      "/lib"))
-                                     '("mesa" "libpng-apng" "libnotify" "libva"
-                                       "pulseaudio" "gtk+" "pipewire"
-                                       ;; For U2F and WebAuthn
-                                       "eudev")))
-
-                              ;; VA-API is run in the RDD (Remote Data Decoder) sandbox
-                              ;; and must be explicitly given access to files it needs.
-                              ;; Rather than adding the whole store (as Nix had
-                              ;; upstream do, see
-                              ;; <https://github.com/NixOS/nixpkgs/pull/165964> and
-                              ;; linked upstream patches), we can just follow the
-                              ;; runpaths of the needed libraries to add everything to
-                              ;; LD_LIBRARY_PATH.  These will then be accessible in the
-                              ;; RDD sandbox.
-                              (rdd-whitelist (map (cut string-append <> "/")
-                                                  (delete-duplicates (append-map
-                                                                      runpaths-of-input
-                                                                      '("mesa"
-                                                                        "ffmpeg")))))
-                              (gtk-share (string-append (assoc-ref inputs
-                                                                   "gtk+")
-                                                        "/share")))
-                         (wrap-program (car (find-files lib "^librewolf$"))
-                           `("LD_LIBRARY_PATH" prefix
-                             (,@libs ,@rdd-whitelist))
-                           `("XDG_DATA_DIRS" prefix
-                             (,gtk-share))
-                           `("MOZ_LEGACY_PROFILES" =
-                             ("1"))
-                           `("MOZ_ALLOW_DOWNGRADE" =
-                             ("1"))))))
-                   (add-after 'wrap-program 'install-desktop-entry
-                     (lambda* (#:key outputs #:allow-other-keys)
-                       (let* ((desktop-file
-                               "taskcluster/docker/firefox-snap/firefox.desktop")
-                              (applications (string-append #$output
-                                             "/share/applications")))
-                         (substitute* desktop-file
-                           (("^Exec=firefox")
-                            (string-append "Exec="
-                                           #$output "/bin/librewolf"))
-                           ;; "Firefox" -> "LibreWolf" everywhere
-                           (("Firefox")
-                            "LibreWolf")
-                           ;; Remove non-Latin translations.
-                           (("^Name\\[(ar|bn)\\].*$")
-                            "")
-                           (("^Icon=.*")
-                            (string-append "Icon="
-                             #$output
-                             "/share/icons/hicolor/128x128/apps/librewolf.png
+                              (substitute* file
+                                (("(checksum = )\".*\"" all name)
+                                 (string-append name "\"" null-hash
+                                                "\""))))
+                            (find-files "." "Cargo\\.lock$"))
+                  (for-each generate-all-checksums
+                            '("build"
+                              "dom/media"
+                              "dom/webauthn"
+                              "gfx"
+                              "intl"
+                              "js"
+                              "media"
+                              "modules"
+                              "mozglue/static/rust"
+                              "netwerk"
+                              "remote"
+                              "security/manager/ssl"
+                              "servo"
+                              "storage"
+                              "third_party/rust"
+                              "toolkit"
+                              "xpcom/rust"
+                              "services")))))
+            (add-after 'patch-cargo-checksums 'remove-cargo-frozen-flag
+              (lambda _
+                ;; Remove --frozen flag from cargo invokation, otherwise it'll
+                ;; complain that it's not able to change Cargo.lock.
+                ;; https://bugzilla.mozilla.org/show_bug.cgi?id=1726373
+                (substitute* "build/RunCbindgen.py"
+                  (("args.append\\(\"--frozen\"\\)") "pass"))))
+            (delete 'bootstrap)
+            (add-before 'configure 'patch-SpeechDispatcherService.cpp
+              (lambda _
+                (let* ((lib "libspeechd.so.2")
+                       (file (string-append
+                              "dom/media/webspeech/synth/"
+                              "speechd/SpeechDispatcherService.cpp"))
+                       (old-content (call-with-input-file file
+                                      get-string-all)))
+                  (substitute
+                   file
+                   `((,(format #f "~s" lib) unquote
+                      (lambda (line _)
+                        (string-replace-substring
+                         line lib
+                         (string-append #$speech-dispatcher
+                                        "/lib/" lib))))))
+                  (if (string=? old-content
+                                (call-with-input-file file
+                                  get-string-all))
+                      (error
+                       "substitute did nothing, phase requires an update")))))
+            (add-before 'configure 'set-build-id
+              ;; Build will write the timestamp to output, which is harmful
+              ;; for reproducibility, so change it to a fixed date.  Use a
+              ;; separate phase for easier modification with inherit.
+              (lambda _
+                (setenv "MOZ_BUILD_DATE"
+                        #$%librewolf-build-id)))
+            (replace 'configure
+              (lambda* (#:key inputs outputs configure-flags
+                        #:allow-other-keys)
+                (setenv "AUTOCONF"
+                        (string-append (assoc-ref inputs "autoconf")
+                                       "/bin/autoconf"))
+                (setenv "SHELL"
+                        (which "bash"))
+                (setenv "CONFIG_SHELL"
+                        (which "bash"))
+                (setenv "MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE"
+                        "system")
+                ;; This should use the host info probably (does it
+                ;; build on non-x86_64 though?)
+                (setenv "GUIX_PYTHONPATH"
+                        (string-append (getcwd)
+                                       "/obj-x86_64-pc-linux-gnu/_virtualenvs/build"))
+
+                ;; Use Clang, Clang is 2x faster than GCC
+                (setenv "AR" "llvm-ar")
+                (setenv "NM" "llvm-nm")
+                (setenv "CC" "clang")
+                (setenv "CXX" "clang++")
+                (setenv "MOZ_NOSPAM" "1")
+                (setenv "MOZ_APP_NAME" "librewolf")
+
+                (setenv "MOZBUILD_STATE_PATH"
+                        (getcwd))
+
+                (let* ((mozconfig (string-append (getcwd) "/mozconfig"))
+                       (out (assoc-ref outputs "out"))
+                       (flags (cons (string-append "--prefix=" out)
+                                    configure-flags)))
+                  (format #t "build directory: ~s~%"
+                          (getcwd))
+                  (format #t "configure flags: ~s~%" flags)
+
+                  (define write-flags
+                    (lambda flags
+                      (display (string-join (map (cut string-append
+                                                      "ac_add_options " <>)
+                                                 flags) "\n"))
+                      (display "\n")))
+                  (with-output-to-file mozconfig
+                    (lambda ()
+                      (apply write-flags flags)
+                      ;; The following option unsets Telemetry
+                      ;; Reporting. With the Addons Fiasco,
+                      ;; Mozilla was found to be collecting
+                      ;; user's data, including saved passwords
+                      ;; and web form data, without users
+                      ;; consent. Mozilla was also found
+                      ;; shipping updates to systems without
+                      ;; the user's knowledge or permission.
+                      ;; As a result of this, use the following
+                      ;; command to permanently disable
+                      ;; telemetry reporting.
+                      (display "unset MOZ_TELEMETRY_REPORTING\n")
+                      (display "mk_add_options MOZ_CRASHREPORTER=0\n")
+                      (display "mk_add_options MOZ_DATA_REPORTING=0\n")
+                      (display
+                       "mk_add_options MOZ_SERVICES_HEALTHREPORT=0")
+                      (display
+                       "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)
+                (apply invoke "./mach" "build"
+                       ;; mach will use parallel build if possible by default
+                       `(,@(if parallel-build?
+                               '()
+                               '("-j1")) ,@make-flags))))
+            (add-after 'build 'neutralise-store-references
+              (lambda _
+                ;; Mangle the store references to compilers &
+                ;; other build tools in about:buildconfig,
+                ;; reducing the package's closure by 1 GiB on
+                ;; x86-64.
+                (let* ((build-dir (car (scandir "."
+                                                (cut string-prefix?
+                                                     "obj-" <>))))
+                       (file (string-append build-dir
+                                            "/dist/bin/chrome/toolkit/"
+                                            "content/global/buildconfig.html")))
+                  (substitute* file
+                    (((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)))))))
+            (replace 'install
+              (lambda _
+                (invoke "./mach" "install")))
+            (add-after 'install 'remove-duplicate-bin
+              (lambda* (#:key outputs #:allow-other-keys)
+                (delete-file (string-append #$output
+                                            "/lib/librewolf/librewolf-bin"))))
+            (add-after 'install 'wrap-glxtest
+              ;; glxtest uses dlopen() to load mesa and pci
+              ;; libs, wrap it to set LD_LIBRARY_PATH.
+              (lambda* (#:key inputs outputs #:allow-other-keys)
+                (let* ((out (assoc-ref outputs "out"))
+                       (lib (string-append out "/lib"))
+                       (libs (map
+                              (lambda (lib-name)
+                                (string-append (assoc-ref inputs
+                                                          lib-name)
+                                               "/lib"))
+                              '("mesa" "pciutils"))))
+                  (wrap-program (car (find-files lib "^glxtest$"))
+                    `("LD_LIBRARY_PATH" prefix ,libs)))))
+            (add-after 'install 'patch-config
+              (lambda* (#:key inputs #:allow-other-keys)
+                (let ((lib (string-append #$output "/lib/librewolf"))
+                      (config-file "librewolf.cfg"))
+
+                  ;; Required for Guix packaged extensions
+                  ;; SCOPE_PROFILE=1, SCOPE_APPLICATION=4, SCOPE_SYSTEM=8
+                  ;; 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"))))))))
+            (add-after 'install 'wrap-program
+              (lambda* (#:key inputs outputs #:allow-other-keys)
+                ;; The following two functions are from Guix's icecat package in
+                ;; (gnu packages gnuzilla).  See commit
+                ;; b7a0935420ee630a29b7e5ac73a32ba1eb24f00b.
+                (define (runpath-of lib)
+                  (call-with-input-file lib
+                    (compose elf-dynamic-info-runpath elf-dynamic-info
+                             parse-elf get-bytevector-all)))
+                (define (runpaths-of-input label)
+                  (let* ((dir (string-append (assoc-ref inputs label)
+                                             "/lib"))
+                         (libs (find-files dir "\\.so$")))
+                    (append-map runpath-of libs)))
+                (let* ((out (assoc-ref outputs "out"))
+                       (lib (string-append out "/lib"))
+                       (libs (map
+                              (lambda (lib-name)
+                                (string-append (assoc-ref inputs
+                                                          lib-name)
+                                               "/lib"))
+                              '("mesa" "libpng-apng" "libnotify" "libva"
+                                "pulseaudio" "gtk+" "pipewire"
+                                ;; For U2F and WebAuthn
+                                "eudev")))
+
+                       ;; VA-API is run in the RDD (Remote Data Decoder) sandbox
+                       ;; and must be explicitly given access to files it needs.
+                       ;; Rather than adding the whole store (as Nix had
+                       ;; upstream do, see
+                       ;; <https://github.com/NixOS/nixpkgs/pull/165964> and
+                       ;; linked upstream patches), we can just follow the
+                       ;; runpaths of the needed libraries to add everything to
+                       ;; LD_LIBRARY_PATH.  These will then be accessible in the
+                       ;; RDD sandbox.
+                       (rdd-whitelist (map (cut string-append <> "/")
+                                           (delete-duplicates (append-map
+                                                               runpaths-of-input
+                                                               '("mesa"
+                                                                 "ffmpeg")))))
+                       (gtk-share (string-append (assoc-ref inputs
+                                                            "gtk+")
+                                                 "/share")))
+                  (wrap-program (car (find-files lib "^librewolf$"))
+                    `("LD_LIBRARY_PATH" prefix
+                      (,@libs ,@rdd-whitelist))
+                    `("XDG_DATA_DIRS" prefix
+                      (,gtk-share))
+                    `("MOZ_LEGACY_PROFILES" =
+                      ("1"))
+                    `("MOZ_ALLOW_DOWNGRADE" =
+                      ("1"))))))
+            (add-after 'wrap-program 'install-desktop-entry
+              (lambda* (#:key outputs #:allow-other-keys)
+                (let* ((desktop-file
+                        "taskcluster/docker/firefox-snap/firefox.desktop")
+                       (applications (string-append #$output
+                                                    "/share/applications")))
+                  (substitute* desktop-file
+                    (("^Exec=firefox")
+                     (string-append "Exec="
+                                    #$output "/bin/librewolf"))
+                    ;; "Firefox" -> "LibreWolf" everywhere
+                    (("Firefox")
+                     "LibreWolf")
+                    ;; Remove non-Latin translations.
+                    (("^Name\\[(ar|bn)\\].*$")
+                     "")
+                    (("^Icon=.*")
+                     (string-append "Icon="
+                                    #$output
+                                    "/share/icons/hicolor/128x128/apps/librewolf.png
 "))
-                           ;; These commands were changed.
-                           (("-NewWindow")
-                            "-new-window")
-                           (("-NewPrivateWindow")
-                            "-new-private-window")
-                           (("StartupNotify=true")
-                            "StartupNotify=true
+                    ;; These commands were changed.
+                    (("-NewWindow")
+                     "-new-window")
+                    (("-NewPrivateWindow")
+                     "-new-private-window")
+                    (("StartupNotify=true")
+                     "StartupNotify=true
 StartupWMClass=Navigator"))
-                         (copy-file desktop-file "librewolf.desktop")
-                         (install-file "librewolf.desktop" applications))))
-                   (add-after 'install-desktop-entry 'install-icons
-                     (lambda* (#:key outputs #:allow-other-keys)
-                       (let ((icon-source-dir (string-append #$output
-                                               "/lib/librewolf/browser/"
-                                               "chrome/icons/default")))
-                         (for-each (lambda (size)
-                                     (let ((dest (string-append #$output
-                                                  "/share/icons/hicolor/"
-                                                  size
-                                                  "x"
-                                                  size
-                                                  "/apps")))
-                                       (mkdir-p dest)
-                                       (symlink (string-append icon-source-dir
-                                                 "/default" size ".png")
-                                                (string-append dest
-                                                 "/librewolf.png"))))
-                                   '("16" "32" "48" "64" "128"))))))
-
-      ;; Test will significantly increase build time but with little rewards.
-      #:tests? #f
-
-      ;; WARNING: Parallel build will consume lots of memory!
-      ;; If you have encountered OOM issue in build phase, try disable it.
-      #:parallel-build? #t
-
-      ;; Some dynamic lib was determined at runtime, so rpath check may fail.
-      #:validate-runpath? #f))
-    (inputs (list bash-minimal
-                  bzip2
-                  cairo
-                  cups
-                  dbus-glib
-                  freetype
-                  ffmpeg
-                  gdk-pixbuf
-                  glib
-                  gtk+
-                  gtk+-2
-                  hunspell
-                  icu4c-73
-                  jemalloc
-                  libcanberra
-                  libevent
-                  libffi
-                  libgnome
-                  libjpeg-turbo
-                  libnotify
-                  libpng-apng
-                  libva
-                  libvpx
-                  libwebp
-                  libxcomposite
-                  libxft
-                  libxinerama
-                  libxscrnsaver
-                  libxt
-                  mesa
-                  mit-krb5
-                  nspr
-                  nss/fixed
-                  pango
-                  pciutils
-                  pipewire
-                  pixman
-                  pulseaudio
-                  speech-dispatcher
-                  sqlite
-                  startup-notification
-                  eudev
-                  unzip
-                  zip
-                  zlib))
-    (native-inputs (list alsa-lib
-                         autoconf-2.13
-                         `(,rust-librewolf "cargo")
-                         clang-18
-                         llvm-18
-                         m4
-                         nasm
-                         node-lts
-                         perl
-                         pkg-config
-                         python
-                         rust-librewolf
-                         rust-cbindgen-0.26
-                         which
-                         yasm))
-    (home-page "https://librewolf.net/")
-    (synopsis
-     "Custom version of Firefox, focused on privacy, security and freedom")
-    (description
-     "LibreWolf is designed to increase protection against tracking and
+                  (copy-file desktop-file "librewolf.desktop")
+                  (install-file "librewolf.desktop" applications))))
+            (add-after 'install-desktop-entry 'install-icons
+              (lambda* (#:key outputs #:allow-other-keys)
+                (let ((icon-source-dir (string-append #$output
+                                                      "/lib/librewolf/browser/"
+                                                      "chrome/icons/default")))
+                  (for-each (lambda (size)
+                              (let ((dest (string-append #$output
+                                                         "/share/icons/hicolor/"
+                                                         size
+                                                         "x"
+                                                         size
+                                                         "/apps")))
+                                (mkdir-p dest)
+                                (symlink (string-append icon-source-dir
+                                                        "/default" size ".png")
+                                         (string-append dest
+                                                        "/librewolf.png"))))
+                            '("16" "32" "48" "64" "128"))))))
+
+        ;; Test will significantly increase build time but with little rewards.
+        #:tests? #f
+
+        ;; WARNING: Parallel build will consume lots of memory!
+        ;; If you have encountered OOM issue in build phase, try disable it.
+        #:parallel-build? #t
+
+        ;; Some dynamic lib was determined at runtime, so rpath check may fail.
+        #:validate-runpath? #f))
+      (inputs (list bash-minimal
+                    bzip2
+                    cairo
+                    cups
+                    dbus-glib
+                    freetype
+                    ffmpeg
+                    gdk-pixbuf
+                    glib
+                    gtk+
+                    gtk+-2
+                    hunspell
+                    icu4c-73
+                    jemalloc
+                    libcanberra
+                    libevent
+                    libffi
+                    libgnome
+                    libjpeg-turbo
+                    libnotify
+                    libpng-apng
+                    libva
+                    libvpx
+                    libwebp
+                    libxcomposite
+                    libxft
+                    libxinerama
+                    libxscrnsaver
+                    libxt
+                    mesa
+                    mit-krb5
+                    nspr
+                    nss-latest
+                    pango
+                    pciutils
+                    pipewire
+                    pixman
+                    pulseaudio
+                    speech-dispatcher
+                    sqlite
+                    startup-notification
+                    eudev
+                    unzip
+                    zip
+                    zlib))
+      (native-inputs (list alsa-lib
+                           autoconf-2.13
+                           `(,rust-librewolf "cargo")
+                           clang-18
+                           llvm-18
+                           m4
+                           nasm
+                           node-lts
+                           perl
+                           pkg-config
+                           python
+                           rust-librewolf
+                           rust-cbindgen-0.26
+                           which
+                           yasm))
+      (home-page "https://librewolf.net/")
+      (synopsis
+       "Custom version of Firefox, focused on privacy, security and freedom")
+      (description
+       "LibreWolf is designed to increase protection against tracking and
 fingerprinting techniques, while also including a few security improvements.
 This is achieved through our privacy and security oriented settings and
 patches.  LibreWolf also aims to remove all the telemetry, data collection and
 annoyances, as well as disabling anti-freedom features like DRM.")
-    (license license:mpl2.0)))
+      (license license:mpl2.0))))
-- 
2.45.1





^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#71832] [PATCH v3 0/2] Add nss-rapid; updte Librewolf to 127.0.2-2.
  2024-06-29  3:57 [bug#71832] [PATCH 0/2] Add nss-latest; updte Librewolf to 127.0.2-2 Ian Eure
  2024-06-29  3:59 ` [bug#71832] [PATCH 1/2] gnu: Add nss-latest Ian Eure
  2024-06-29 17:22 ` [bug#71832] [PATCH v2 0/2] Add nss-latest; update Librewolf to 127.0.2-2 Ian Eure
@ 2024-07-02  0:21 ` Ian Eure
  2024-07-02  0:21   ` [bug#71832] [PATCH v3 1/2] gnu: Add nss-rapid Ian Eure
  2024-07-02  0:21   ` [bug#71832] [PATCH v3 2/2] gnu: librewolf: Update to 127.0.2-1 Ian Eure
  2 siblings, 2 replies; 9+ messages in thread
From: Ian Eure @ 2024-07-02  0:21 UTC (permalink / raw)
  To: 71832; +Cc: Ian Eure

Updated with discussion from guix-devel:

- nss rapid release package is now named `nss-rapid'.
- Synposis and description clarify what this means.
- Comments added above nss-rapid with packager guidance.

Ian Eure (2):
  gnu: Add nss-rapid.
  gnu: librewolf: Update to 127.0.2-1.

 gnu/packages/librewolf.scm | 1044 ++++++++++++++++++------------------
 gnu/packages/nss.scm       |   80 ++-
 2 files changed, 600 insertions(+), 524 deletions(-)

-- 
2.45.1





^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#71832] [PATCH v3 1/2] gnu: Add nss-rapid.
  2024-07-02  0:21 ` [bug#71832] [PATCH v3 0/2] Add nss-rapid; updte Librewolf to 127.0.2-2 Ian Eure
@ 2024-07-02  0:21   ` Ian Eure
  2024-07-02  0:21   ` [bug#71832] [PATCH v3 2/2] gnu: librewolf: Update to 127.0.2-1 Ian Eure
  1 sibling, 0 replies; 9+ messages in thread
From: Ian Eure @ 2024-07-02  0:21 UTC (permalink / raw)
  To: 71832; +Cc: Ian Eure

* gnu/packages/nss.scm (nss-rapid): New variable.

Change-Id: I2bdd2119fb0c857feae9eb2e47a28909b8228cd7
---
 gnu/packages/nss.scm | 80 ++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 74 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm
index d558079f44..4e892ce649 100644
--- a/gnu/packages/nss.scm
+++ b/gnu/packages/nss.scm
@@ -106,6 +106,9 @@ (define-public nspr-4.32
               (base32
                "0v3zds1id71j5a5si42a658fjz8nv2f6zp6w4gqrqmdr6ksz8sxv"))))))
 
+;; nss should track ESRs, but currently doesn't.  When the next ESR it out, it
+;; should get updated.
+
 (define-public nss
   (package
     (name "nss")
@@ -153,13 +156,13 @@ (define-public nss
                 ;; Ensure we are building for the (%current-target-system).
                 #$@(if (%current-target-system)
                        #~((string-append
-                            "OS_TEST="
-                            (string-take #$(%current-target-system)
-                                         (string-index #$(%current-target-system) #\-)))
+                           "OS_TEST="
+                           (string-take #$(%current-target-system)
+                                        (string-index #$(%current-target-system) #\-)))
                           (string-append
-                            "KERNEL=" (cond (#$(target-hurd?) "gnu")
-                                            (#$(target-linux?) "linux")
-                                            (else ""))))
+                           "KERNEL=" (cond (#$(target-hurd?) "gnu")
+                                           (#$(target-linux?) "linux")
+                                           (else ""))))
                        #~())
                 #$@(if (%current-target-system)
                        #~("CROSS_COMPILE=1")
@@ -303,6 +306,71 @@ (define-public nss/fixed
                          (invoke "faketime" "2024-01-23" "./nss/tests/all.sh"))
                        (format #t "test suite not run~%"))))))))))))
 
+;; nss-rapid tracks the rapid release channel.  Unless your package requires a
+;; newer version, you should prefer the `nss' package, which tracks the ESR
+;; channel.
+;;
+;; See https://wiki.mozilla.org/NSS:Release_Versions
+;; and https://wiki.mozilla.org/Rapid_Release_Model
+
+(define-public nss-rapid
+  (package
+   (inherit nss)
+   (name "nss-rapid")
+   (version "3.101")
+   (source (origin
+             (inherit (package-source nss))
+             (uri (let ((version-with-underscores
+                         (string-join (string-split version #\.) "_")))
+                    (string-append
+                     "https://ftp.mozilla.org/pub/mozilla.org/security/nss/"
+                     "releases/NSS_" version-with-underscores "_RTM/src/"
+                     "nss-" version ".tar.gz")))
+             (sha256
+              (base32
+               "1rw5xpclsy174znvxcb4d4zgjwadxy45mbh0wvkm3fxpnkq4i5w5"))))
+   (arguments
+    (substitute-keyword-arguments (package-arguments nss)
+      ((#:phases phases)
+       #~(modify-phases #$phases
+           (replace 'check
+             (lambda* (#:key tests? #:allow-other-keys)
+               (if tests?
+                   (begin
+                     ;; Use 127.0.0.1 instead of $HOST.$DOMSUF as HOSTADDR for
+                     ;; testing.  The latter requires a working DNS or /etc/hosts.
+                     (setenv "DOMSUF" "localdomain")
+                     (setenv "USE_IP" "TRUE")
+                     (setenv "IP_ADDRESS" "127.0.0.1")
+
+                     ;; This specific test is looking at performance "now
+                     ;; verify that we can quickly dump a database", and
+                     ;; we're not testing performance here (especially
+                     ;; since we're using faketime), so raise the
+                     ;; threshold
+                     (substitute* "nss/tests/dbtests/dbtests.sh"
+                       ((" -lt 5") " -lt 50"))
+
+                     ;; Since the test suite is very lengthy, run the test
+                     ;; suite once, not thrice as done by default, by
+                     ;; selecting only the 'standard' cycle.
+                     (setenv "NSS_CYCLES" "standard")
+
+                     ;; The "PayPalEE.cert" certificate expires every six months,
+                     ;; leading to test failures:
+                     ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=609734>.  To
+                     ;; work around that, set the time to roughly the release date.
+                     (invoke "faketime" "2024-01-23" "./nss/tests/all.sh"))
+                   (format #t "test suite not run~%"))))))))
+   (synopsis "Network Security Services (Rapid Release)")
+   (description
+    "Network Security Services (@dfn{NSS}) is a set of libraries designed to
+support cross-platform development of security-enabled client and server
+applications.  Applications built with NSS can support SSL v2 and v3, TLS,
+PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME, X.509 v3 certificates, and other
+security standards.
+
+This package tracks the Rapid Release channel, which updates frequently.")))
 (define-public nsncd
   (package
     (name "nsncd")
-- 
2.45.1





^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#71832] [PATCH v3 2/2] gnu: librewolf: Update to 127.0.2-1.
  2024-07-02  0:21 ` [bug#71832] [PATCH v3 0/2] Add nss-rapid; updte Librewolf to 127.0.2-2 Ian Eure
  2024-07-02  0:21   ` [bug#71832] [PATCH v3 1/2] gnu: Add nss-rapid Ian Eure
@ 2024-07-02  0:21   ` Ian Eure
  1 sibling, 0 replies; 9+ messages in thread
From: Ian Eure @ 2024-07-02  0:21 UTC (permalink / raw)
  To: 71832; +Cc: Ian Eure

* gnu/packages/librewolf.scm (librewolf): Update to 127.0.2-1.  Reorganize
module to improve usability and reduce duplication.  The Rust package and
build ID are now at the top of the file.  The librewolf-source variable has
been replaced with the make-librewolf-source procedure, centralizing versions
& hashes in the librewolf package definition.  Dedent some of the package’s
arguments to improve readability.

Change-Id: I15f8a2aa1fae07e0497ab5511d10af0c1f70cc2e
---
 gnu/packages/librewolf.scm | 1044 ++++++++++++++++++------------------
 1 file changed, 526 insertions(+), 518 deletions(-)

diff --git a/gnu/packages/librewolf.scm b/gnu/packages/librewolf.scm
index c84bcaf3ce..a400080dcb 100644
--- a/gnu/packages/librewolf.scm
+++ b/gnu/packages/librewolf.scm
@@ -93,6 +93,18 @@ (define-module (gnu packages librewolf)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xorg))
 
+;; Define the versions of rust needed to build librewolf, trying to match
+;; upstream.  See the file taskcluster/kinds/toolchain/rust.yml at
+;; https://searchfox.org under the particular firefox release, like
+;; mozilla-esr102.
+;; 1.75 is the default in Guix, 1.77 is the minimum for Librewolf.
+(define rust-librewolf rust-1.77)
+
+;; Update this id with every update to its release date.
+;; It's used for cache validation and therefore can lead to strange bugs.
+;; ex: date '+%Y%m%d%H%M%S'
+(define %librewolf-build-id "20240626133423")
+
 (define (firefox-source-origin version hash)
   (origin
     (method url-fetch)
@@ -114,11 +126,14 @@ (define (librewolf-source-origin version hash)
 
 (define computed-origin-method (@@ (guix packages) computed-origin-method))
 
-(define librewolf-source
-  (let* ((ff-src (firefox-source-origin "126.0.1" "0fr679rcwshwpfxidc55b2xsn4pmrr7p9ix4rr2mv2k7kwsjcc7n"))
-         (version "126.0.1-1")
-         (lw-src (librewolf-source-origin version "0cac80073vkzd85ai9rbnwixs1h9bpy4dj2ri6jxdlqsy5d663km")))
-
+(define* (make-librewolf-source version #:key firefox-hash librewolf-hash)
+  (let* ((ff-src (firefox-source-origin
+                  (car (string-split version #\-))
+                  firefox-hash))
+         (version version)
+         (lw-src (librewolf-source-origin
+                  version
+                  librewolf-hash)))
     (origin
       (method computed-origin-method)
       (file-name (string-append "librewolf-" version ".source.tar.gz"))
@@ -162,11 +177,6 @@ (define librewolf-source
                  (("^ff_source_tarball:=.*")
                   (string-append "ff_source_tarball:=" #+ff-src)))
 
-               ;; Remove encoding_rs patch, it doesn't build with Rust 1.75.
-               (substitute* '("assets/patches.txt")
-                 (("patches/encoding_rs.patch\\\n$")
-                  ""))
-
                ;; Stage locales.
                (begin
                  (format #t "Staging locales...~%")
@@ -204,523 +214,521 @@ (define librewolf-source
                                          ".source.tar.gz")
                           #$output))))))))
 
-;; Define the versions of rust needed to build librewolf, trying to match
-;; upstream.  See the file taskcluster/ci/toolchain/rust.yml at
-;; https://searchfox.org under the particular firefox release, like
-;; mozilla-esr102.
-(define rust-librewolf rust) ; 1.75 is the default in Guix, 1.65 is the minimum.
-
-;; Update this id with every update to its release date.
-;; It's used for cache validation and therefore can lead to strange bugs.
-;; ex: date '+%Y%m%d%H%M%S'
-(define %librewolf-build-id "20240607212143")
-
 (define-public librewolf
-  (package
-    (name "librewolf")
-    (version "126.0.1-1")
-    (source librewolf-source)
-    (build-system gnu-build-system)
-    (arguments
-     (list
-      #:configure-flags #~(let ((clang #$(this-package-native-input "clang")))
-                            `("--enable-application=browser"
-
-                              ;; Configuration
-                              "--without-wasm-sandboxed-libraries"
-                              "--with-system-jpeg"
-                              "--with-system-zlib"
-                              "--with-system-png"
-                              "--with-system-webp"
-                              "--with-system-icu"
-                              "--with-system-libvpx"
-                              "--with-system-libevent"
-                              "--with-system-ffi"
-                              "--enable-system-pixman"
-                              "--enable-jemalloc"
-
-                              ;; see https://bugs.gnu.org/32833
-                              "--with-system-nspr"
-                              "--with-system-nss"
-
-                              ,(string-append "--with-clang-path=" clang
-                                              "/bin/clang")
-                              ,(string-append "--with-libclang-path=" clang
-                                              "/lib")
-
-                              ;; Distribution
-                              "--with-distribution-id=org.guix"
-                              "--with-app-name=librewolf"
-                              "--with-app-basename=LibreWolf"
-                              "--with-branding=browser/branding/librewolf"
-
-                              ;; Features
-                              "--disable-tests"
-                              "--disable-updater"
-                              "--enable-pulseaudio"
-                              "--disable-crashreporter"
-                              "--allow-addon-sideload"
-                              "--with-unsigned-addon-scopes=app,system"
-                              "--disable-eme"
-
-                              ;; Build details
-                              "--disable-debug"
-                              "--enable-rust-simd"
-                              "--enable-release"
-                              "--enable-optimize"
-                              "--enable-strip"
-                              "--enable-hardening"
-                              "--disable-elf-hack"))
-      #:imported-modules %cargo-utils-modules
-      #:modules `((ice-9 regex)
-                  (ice-9 string-fun)
-                  (ice-9 ftw)
-                  (srfi srfi-1)
-                  (srfi srfi-26)
-                  (rnrs bytevectors)
-                  (rnrs io ports)
-                  (guix elf)
-                  (guix build gremlin)
-                  ,@%gnu-build-system-modules)
-      #:phases #~(modify-phases %standard-phases
-                   (add-after 'unpack 'fix-preferences
-                     (lambda* (#:key inputs #:allow-other-keys)
-                       (let ((port (open-file "browser/app/profile/firefox.js"
-                                    "a")))
-                         (define (write-setting key value)
-                           (format port "~%pref(\"~a\", ~a);~%" key value)
-                           (format #t
+  (let ((version "127.0.2-2"))
+    (package
+      (name "librewolf")
+      (version version)
+      (source (make-librewolf-source
+               version
+               #:firefox-hash
+               "1s73fdp7k60058ylyvlixq13k5hfbmj6k1y42fmzqlpg7n62lyqb"
+               #:librewolf-hash
+               "1f4xz496x1nf7lmvk50hakj9p6q0kzxl5f9s2k0b6kczvyc8gw5n"))
+
+      (build-system gnu-build-system)
+      (arguments
+       (list
+        #:configure-flags
+        #~(let ((clang #$(this-package-native-input "clang")))
+            `("--enable-application=browser"
+
+              ;; Configuration
+              "--without-wasm-sandboxed-libraries"
+              "--with-system-jpeg"
+              "--with-system-zlib"
+              "--with-system-png"
+              "--with-system-webp"
+              "--with-system-icu"
+              "--with-system-libvpx"
+              "--with-system-libevent"
+              "--with-system-ffi"
+              "--enable-system-pixman"
+              "--enable-jemalloc"
+
+              ;; see https://bugs.gnu.org/32833
+              "--with-system-nspr"
+              "--with-system-nss"
+
+              ,(string-append "--with-clang-path=" clang
+                              "/bin/clang")
+              ,(string-append "--with-libclang-path=" clang
+                              "/lib")
+
+              ;; Distribution
+              "--with-distribution-id=org.guix"
+              "--with-app-name=librewolf"
+              "--with-app-basename=LibreWolf"
+              "--with-branding=browser/branding/librewolf"
+
+              ;; Features
+              "--disable-tests"
+              "--disable-updater"
+              "--enable-pulseaudio"
+              "--disable-crashreporter"
+              "--allow-addon-sideload"
+              "--with-unsigned-addon-scopes=app,system"
+              "--disable-eme"
+
+              ;; Build details
+              "--disable-debug"
+              "--enable-rust-simd"
+              "--enable-release"
+              "--enable-optimize"
+              "--enable-strip"
+              "--enable-hardening"
+              "--disable-elf-hack"))
+        #:imported-modules %cargo-utils-modules
+        #:modules `((ice-9 regex)
+                    (ice-9 string-fun)
+                    (ice-9 ftw)
+                    (srfi srfi-1)
+                    (srfi srfi-26)
+                    (rnrs bytevectors)
+                    (rnrs io ports)
+                    (guix elf)
+                    (guix build gremlin)
+                    ,@%gnu-build-system-modules)
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'fix-preferences
+              (lambda* (#:key inputs #:allow-other-keys)
+                (let ((port (open-file "browser/app/profile/firefox.js"
+                                       "a")))
+                  (define (write-setting key value)
+                    (format port "~%pref(\"~a\", ~a);~%" key value)
+                    (format #t
                             "fix-preferences: setting value of ~a to ~a~%" key
                             value))
 
-                         ;; We should allow the sandbox to read the store directory,
-                         ;; because the sandbox has access to /usr on FHS distros.
-                         (write-setting
-                          "security.sandbox.content.read_path_whitelist"
-                          (string-append "\""
-                                         (%store-directory) "/\""))
-
-                         ;; XDG settings should be managed by Guix.
-                         (write-setting "browser.shell.checkDefaultBrowser"
-                                        "false")
-                         (close-port port))))
-                   (add-after 'fix-preferences 'fix-ffmpeg-runtime-linker
-                     (lambda* (#:key inputs #:allow-other-keys)
-                       (let* ((ffmpeg (assoc-ref inputs "ffmpeg"))
-                              (libavcodec (string-append ffmpeg
-                                                         "/lib/libavcodec.so")))
-                         ;; Arrange to load libavcodec.so by its absolute file name.
-                         (substitute* "dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp"
-                           (("libavcodec\\.so")
-                            libavcodec)))))
-                   (add-after 'patch-source-shebangs 'patch-cargo-checksums
-                     (lambda _
-                       (use-modules (guix build cargo-utils))
-                       (let ((null-hash
-                              ;; This is the SHA256 output of an empty string.
-                              (string-append
-                               "e3b0c44298fc1c149afbf4c8996fb924"
-                               "27ae41e4649b934ca495991b7852b855")))
-                         (for-each (lambda (file)
-                                     (format #t
+                  ;; We should allow the sandbox to read the store directory,
+                  ;; because the sandbox has access to /usr on FHS distros.
+                  (write-setting
+                   "security.sandbox.content.read_path_whitelist"
+                   (string-append "\""
+                                  (%store-directory) "/\""))
+
+                  ;; XDG settings should be managed by Guix.
+                  (write-setting "browser.shell.checkDefaultBrowser"
+                                 "false")
+                  (close-port port))))
+            (add-after 'fix-preferences 'fix-ffmpeg-runtime-linker
+              (lambda* (#:key inputs #:allow-other-keys)
+                (let* ((ffmpeg (assoc-ref inputs "ffmpeg"))
+                       (libavcodec (string-append ffmpeg
+                                                  "/lib/libavcodec.so")))
+                  ;; Arrange to load libavcodec.so by its absolute file name.
+                  (substitute* "dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp"
+                    (("libavcodec\\.so")
+                     libavcodec)))))
+            (add-after 'patch-source-shebangs 'patch-cargo-checksums
+              (lambda _
+                (use-modules (guix build cargo-utils))
+                (let ((null-hash
+                       ;; This is the SHA256 output of an empty string.
+                       (string-append
+                        "e3b0c44298fc1c149afbf4c8996fb924"
+                        "27ae41e4649b934ca495991b7852b855")))
+                  (for-each (lambda (file)
+                              (format #t
                                       "patch-cargo-checksums: patching checksums in ~a~%"
                                       file)
-                                     (substitute* file
-                                       (("(checksum = )\".*\"" all name)
-                                        (string-append name "\"" null-hash
-                                                       "\""))))
-                                   (find-files "." "Cargo\\.lock$"))
-                         (for-each generate-all-checksums
-                                   '("build"
-                                     "dom/media"
-                                     "dom/webauthn"
-                                     "gfx"
-                                     "intl"
-                                     "js"
-                                     "media"
-                                     "modules"
-                                     "mozglue/static/rust"
-                                     "netwerk"
-                                     "remote"
-                                     "security/manager/ssl"
-                                     "servo"
-                                     "storage"
-                                     "third_party/rust"
-                                     "toolkit"
-                                     "xpcom/rust"
-                                     "services")))))
-                   (add-after 'patch-cargo-checksums 'remove-cargo-frozen-flag
-                     (lambda _
-                       ;; Remove --frozen flag from cargo invokation, otherwise it'll
-                       ;; complain that it's not able to change Cargo.lock.
-                       ;; https://bugzilla.mozilla.org/show_bug.cgi?id=1726373
-                       (substitute* "build/RunCbindgen.py"
-                         (("args.append\\(\"--frozen\"\\)") "pass"))))
-                   (delete 'bootstrap)
-                   (add-before 'configure 'patch-SpeechDispatcherService.cpp
-                     (lambda _
-                       (let* ((lib "libspeechd.so.2")
-                              (file (string-append
-                                     "dom/media/webspeech/synth/"
-                                     "speechd/SpeechDispatcherService.cpp"))
-                              (old-content (call-with-input-file file
-                                             get-string-all)))
-                         (substitute
-                          file
-                          `((,(format #f "~s" lib) unquote
-                             (lambda (line _)
-                               (string-replace-substring
-                                line lib
-                                (string-append #$speech-dispatcher
-                                               "/lib/" lib))))))
-                         (if (string=? old-content
-                                       (call-with-input-file file
-                                         get-string-all))
-                             (error
-                              "substitute did nothing, phase requires an update")))))
-                   (add-before 'configure 'set-build-id
-                     ;; Build will write the timestamp to output, which is harmful
-                     ;; for reproducibility, so change it to a fixed date.  Use a
-                     ;; separate phase for easier modification with inherit.
-                     (lambda _
-                       (setenv "MOZ_BUILD_DATE"
-                               #$%librewolf-build-id)))
-                   (replace 'configure
-                     (lambda* (#:key inputs outputs configure-flags
-                               #:allow-other-keys)
-                       (setenv "AUTOCONF"
-                               (string-append (assoc-ref inputs "autoconf")
-                                              "/bin/autoconf"))
-                       (setenv "SHELL"
-                               (which "bash"))
-                       (setenv "CONFIG_SHELL"
-                               (which "bash"))
-                       (setenv "MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE"
-                               "system")
-                       ;; This should use the host info probably (does it
-                       ;; build on non-x86_64 though?)
-                       (setenv "GUIX_PYTHONPATH"
-                               (string-append (getcwd)
-                                "/obj-x86_64-pc-linux-gnu/_virtualenvs/build"))
-
-                       ;; Use Clang, Clang is 2x faster than GCC
-                       (setenv "AR" "llvm-ar")
-                       (setenv "NM" "llvm-nm")
-                       (setenv "CC" "clang")
-                       (setenv "CXX" "clang++")
-                       (setenv "MOZ_NOSPAM" "1")
-                       (setenv "MOZ_APP_NAME" "librewolf")
-
-                       (setenv "MOZBUILD_STATE_PATH"
-                               (getcwd))
-
-                       (let* ((mozconfig (string-append (getcwd) "/mozconfig"))
-                              (out (assoc-ref outputs "out"))
-                              (flags (cons (string-append "--prefix=" out)
-                                           configure-flags)))
-                         (format #t "build directory: ~s~%"
-                                 (getcwd))
-                         (format #t "configure flags: ~s~%" flags)
-
-                         (define write-flags
-                           (lambda flags
-                             (display (string-join (map (cut string-append
-                                                         "ac_add_options " <>)
-                                                        flags) "\n"))
-                             (display "\n")))
-                         (with-output-to-file mozconfig
-                           (lambda ()
-                             (apply write-flags flags)
-                             ;; The following option unsets Telemetry
-                             ;; Reporting. With the Addons Fiasco,
-                             ;; Mozilla was found to be collecting
-                             ;; user's data, including saved passwords
-                             ;; and web form data, without users
-                             ;; consent. Mozilla was also found
-                             ;; shipping updates to systems without
-                             ;; the user's knowledge or permission.
-                             ;; As a result of this, use the following
-                             ;; command to permanently disable
-                             ;; telemetry reporting.
-                             (display "unset MOZ_TELEMETRY_REPORTING\n")
-                             (display "mk_add_options MOZ_CRASHREPORTER=0\n")
-                             (display "mk_add_options MOZ_DATA_REPORTING=0\n")
-                             (display
-                              "mk_add_options MOZ_SERVICES_HEALTHREPORT=0")
-                             (display
-                              "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)
-                       (apply invoke "./mach" "build"
-                              ;; mach will use parallel build if possible by default
-                              `(,@(if parallel-build?
-                                      '()
-                                      '("-j1")) ,@make-flags))))
-                   (add-after 'build 'neutralise-store-references
-                     (lambda _
-                       ;; Mangle the store references to compilers &
-                       ;; other build tools in about:buildconfig,
-                       ;; reducing the package's closure by 1 GiB on
-                       ;; x86-64.
-                       (let* ((build-dir (car (scandir "."
-                                                       (cut string-prefix?
-                                                            "obj-" <>))))
-                              (file (string-append build-dir
-                                     "/dist/bin/chrome/toolkit/"
-                                     "content/global/buildconfig.html")))
-                         (substitute* file
-                           (((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)))))))
-                   (replace 'install
-                     (lambda _
-                       (invoke "./mach" "install")))
-                   (add-after 'install 'remove-duplicate-bin
-                     (lambda* (#:key outputs #:allow-other-keys)
-                       (delete-file (string-append #$output
-                                     "/lib/librewolf/librewolf-bin"))))
-                   (add-after 'install 'wrap-glxtest
-                     ;; glxtest uses dlopen() to load mesa and pci
-                     ;; libs, wrap it to set LD_LIBRARY_PATH.
-                     (lambda* (#:key inputs outputs #:allow-other-keys)
-                       (let* ((out (assoc-ref outputs "out"))
-                              (lib (string-append out "/lib"))
-                              (libs (map
-                                     (lambda (lib-name)
-                                       (string-append (assoc-ref inputs
-                                                                 lib-name)
-                                                      "/lib"))
-                                     '("mesa" "pciutils"))))
-                         (wrap-program (car (find-files lib "^glxtest$"))
-                           `("LD_LIBRARY_PATH" prefix ,libs)))))
-                   (add-after 'install 'patch-config
-                     (lambda* (#:key inputs #:allow-other-keys)
-                       (let ((lib (string-append #$output "/lib/librewolf"))
-                             (config-file "librewolf.cfg"))
-
-                         ;; Required for Guix packaged extensions
-                         ;; SCOPE_PROFILE=1, SCOPE_APPLICATION=4, SCOPE_SYSTEM=8
-                         ;; 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"))))))))
-                   (add-after 'install 'wrap-program
-                     (lambda* (#:key inputs outputs #:allow-other-keys)
-                       ;; The following two functions are from Guix's icecat package in
-                       ;; (gnu packages gnuzilla).  See commit
-                       ;; b7a0935420ee630a29b7e5ac73a32ba1eb24f00b.
-                       (define (runpath-of lib)
-                         (call-with-input-file lib
-                           (compose elf-dynamic-info-runpath elf-dynamic-info
-                                    parse-elf get-bytevector-all)))
-                       (define (runpaths-of-input label)
-                         (let* ((dir (string-append (assoc-ref inputs label)
-                                                    "/lib"))
-                                (libs (find-files dir "\\.so$")))
-                           (append-map runpath-of libs)))
-                       (let* ((out (assoc-ref outputs "out"))
-                              (lib (string-append out "/lib"))
-                              (libs (map
-                                     (lambda (lib-name)
-                                       (string-append (assoc-ref inputs
-                                                                 lib-name)
-                                                      "/lib"))
-                                     '("mesa" "libpng-apng" "libnotify" "libva"
-                                       "pulseaudio" "gtk+" "pipewire"
-                                       ;; For U2F and WebAuthn
-                                       "eudev")))
-
-                              ;; VA-API is run in the RDD (Remote Data Decoder) sandbox
-                              ;; and must be explicitly given access to files it needs.
-                              ;; Rather than adding the whole store (as Nix had
-                              ;; upstream do, see
-                              ;; <https://github.com/NixOS/nixpkgs/pull/165964> and
-                              ;; linked upstream patches), we can just follow the
-                              ;; runpaths of the needed libraries to add everything to
-                              ;; LD_LIBRARY_PATH.  These will then be accessible in the
-                              ;; RDD sandbox.
-                              (rdd-whitelist (map (cut string-append <> "/")
-                                                  (delete-duplicates (append-map
-                                                                      runpaths-of-input
-                                                                      '("mesa"
-                                                                        "ffmpeg")))))
-                              (gtk-share (string-append (assoc-ref inputs
-                                                                   "gtk+")
-                                                        "/share")))
-                         (wrap-program (car (find-files lib "^librewolf$"))
-                           `("LD_LIBRARY_PATH" prefix
-                             (,@libs ,@rdd-whitelist))
-                           `("XDG_DATA_DIRS" prefix
-                             (,gtk-share))
-                           `("MOZ_LEGACY_PROFILES" =
-                             ("1"))
-                           `("MOZ_ALLOW_DOWNGRADE" =
-                             ("1"))))))
-                   (add-after 'wrap-program 'install-desktop-entry
-                     (lambda* (#:key outputs #:allow-other-keys)
-                       (let* ((desktop-file
-                               "taskcluster/docker/firefox-snap/firefox.desktop")
-                              (applications (string-append #$output
-                                             "/share/applications")))
-                         (substitute* desktop-file
-                           (("^Exec=firefox")
-                            (string-append "Exec="
-                                           #$output "/bin/librewolf"))
-                           ;; "Firefox" -> "LibreWolf" everywhere
-                           (("Firefox")
-                            "LibreWolf")
-                           ;; Remove non-Latin translations.
-                           (("^Name\\[(ar|bn)\\].*$")
-                            "")
-                           (("^Icon=.*")
-                            (string-append "Icon="
-                             #$output
-                             "/share/icons/hicolor/128x128/apps/librewolf.png
+                              (substitute* file
+                                (("(checksum = )\".*\"" all name)
+                                 (string-append name "\"" null-hash
+                                                "\""))))
+                            (find-files "." "Cargo\\.lock$"))
+                  (for-each generate-all-checksums
+                            '("build"
+                              "dom/media"
+                              "dom/webauthn"
+                              "gfx"
+                              "intl"
+                              "js"
+                              "media"
+                              "modules"
+                              "mozglue/static/rust"
+                              "netwerk"
+                              "remote"
+                              "security/manager/ssl"
+                              "servo"
+                              "storage"
+                              "third_party/rust"
+                              "toolkit"
+                              "xpcom/rust"
+                              "services")))))
+            (add-after 'patch-cargo-checksums 'remove-cargo-frozen-flag
+              (lambda _
+                ;; Remove --frozen flag from cargo invokation, otherwise it'll
+                ;; complain that it's not able to change Cargo.lock.
+                ;; https://bugzilla.mozilla.org/show_bug.cgi?id=1726373
+                (substitute* "build/RunCbindgen.py"
+                  (("args.append\\(\"--frozen\"\\)") "pass"))))
+            (delete 'bootstrap)
+            (add-before 'configure 'patch-SpeechDispatcherService.cpp
+              (lambda _
+                (let* ((lib "libspeechd.so.2")
+                       (file (string-append
+                              "dom/media/webspeech/synth/"
+                              "speechd/SpeechDispatcherService.cpp"))
+                       (old-content (call-with-input-file file
+                                      get-string-all)))
+                  (substitute
+                   file
+                   `((,(format #f "~s" lib) unquote
+                      (lambda (line _)
+                        (string-replace-substring
+                         line lib
+                         (string-append #$speech-dispatcher
+                                        "/lib/" lib))))))
+                  (if (string=? old-content
+                                (call-with-input-file file
+                                  get-string-all))
+                      (error
+                       "substitute did nothing, phase requires an update")))))
+            (add-before 'configure 'set-build-id
+              ;; Build will write the timestamp to output, which is harmful
+              ;; for reproducibility, so change it to a fixed date.  Use a
+              ;; separate phase for easier modification with inherit.
+              (lambda _
+                (setenv "MOZ_BUILD_DATE"
+                        #$%librewolf-build-id)))
+            (replace 'configure
+              (lambda* (#:key inputs outputs configure-flags
+                        #:allow-other-keys)
+                (setenv "AUTOCONF"
+                        (string-append (assoc-ref inputs "autoconf")
+                                       "/bin/autoconf"))
+                (setenv "SHELL"
+                        (which "bash"))
+                (setenv "CONFIG_SHELL"
+                        (which "bash"))
+                (setenv "MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE"
+                        "system")
+                ;; This should use the host info probably (does it
+                ;; build on non-x86_64 though?)
+                (setenv "GUIX_PYTHONPATH"
+                        (string-append (getcwd)
+                                       "/obj-x86_64-pc-linux-gnu/_virtualenvs/build"))
+
+                ;; Use Clang, Clang is 2x faster than GCC
+                (setenv "AR" "llvm-ar")
+                (setenv "NM" "llvm-nm")
+                (setenv "CC" "clang")
+                (setenv "CXX" "clang++")
+                (setenv "MOZ_NOSPAM" "1")
+                (setenv "MOZ_APP_NAME" "librewolf")
+
+                (setenv "MOZBUILD_STATE_PATH"
+                        (getcwd))
+
+                (let* ((mozconfig (string-append (getcwd) "/mozconfig"))
+                       (out (assoc-ref outputs "out"))
+                       (flags (cons (string-append "--prefix=" out)
+                                    configure-flags)))
+                  (format #t "build directory: ~s~%"
+                          (getcwd))
+                  (format #t "configure flags: ~s~%" flags)
+
+                  (define write-flags
+                    (lambda flags
+                      (display (string-join (map (cut string-append
+                                                      "ac_add_options " <>)
+                                                 flags) "\n"))
+                      (display "\n")))
+                  (with-output-to-file mozconfig
+                    (lambda ()
+                      (apply write-flags flags)
+                      ;; The following option unsets Telemetry
+                      ;; Reporting. With the Addons Fiasco,
+                      ;; Mozilla was found to be collecting
+                      ;; user's data, including saved passwords
+                      ;; and web form data, without users
+                      ;; consent. Mozilla was also found
+                      ;; shipping updates to systems without
+                      ;; the user's knowledge or permission.
+                      ;; As a result of this, use the following
+                      ;; command to permanently disable
+                      ;; telemetry reporting.
+                      (display "unset MOZ_TELEMETRY_REPORTING\n")
+                      (display "mk_add_options MOZ_CRASHREPORTER=0\n")
+                      (display "mk_add_options MOZ_DATA_REPORTING=0\n")
+                      (display
+                       "mk_add_options MOZ_SERVICES_HEALTHREPORT=0")
+                      (display
+                       "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)
+                (apply invoke "./mach" "build"
+                       ;; mach will use parallel build if possible by default
+                       `(,@(if parallel-build?
+                               '()
+                               '("-j1")) ,@make-flags))))
+            (add-after 'build 'neutralise-store-references
+              (lambda _
+                ;; Mangle the store references to compilers &
+                ;; other build tools in about:buildconfig,
+                ;; reducing the package's closure by 1 GiB on
+                ;; x86-64.
+                (let* ((build-dir (car (scandir "."
+                                                (cut string-prefix?
+                                                     "obj-" <>))))
+                       (file (string-append build-dir
+                                            "/dist/bin/chrome/toolkit/"
+                                            "content/global/buildconfig.html")))
+                  (substitute* file
+                    (((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)))))))
+            (replace 'install
+              (lambda _
+                (invoke "./mach" "install")))
+            (add-after 'install 'remove-duplicate-bin
+              (lambda* (#:key outputs #:allow-other-keys)
+                (delete-file (string-append #$output
+                                            "/lib/librewolf/librewolf-bin"))))
+            (add-after 'install 'wrap-glxtest
+              ;; glxtest uses dlopen() to load mesa and pci
+              ;; libs, wrap it to set LD_LIBRARY_PATH.
+              (lambda* (#:key inputs outputs #:allow-other-keys)
+                (let* ((out (assoc-ref outputs "out"))
+                       (lib (string-append out "/lib"))
+                       (libs (map
+                              (lambda (lib-name)
+                                (string-append (assoc-ref inputs
+                                                          lib-name)
+                                               "/lib"))
+                              '("mesa" "pciutils"))))
+                  (wrap-program (car (find-files lib "^glxtest$"))
+                    `("LD_LIBRARY_PATH" prefix ,libs)))))
+            (add-after 'install 'patch-config
+              (lambda* (#:key inputs #:allow-other-keys)
+                (let ((lib (string-append #$output "/lib/librewolf"))
+                      (config-file "librewolf.cfg"))
+
+                  ;; Required for Guix packaged extensions
+                  ;; SCOPE_PROFILE=1, SCOPE_APPLICATION=4, SCOPE_SYSTEM=8
+                  ;; 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"))))))))
+            (add-after 'install 'wrap-program
+              (lambda* (#:key inputs outputs #:allow-other-keys)
+                ;; The following two functions are from Guix's icecat package in
+                ;; (gnu packages gnuzilla).  See commit
+                ;; b7a0935420ee630a29b7e5ac73a32ba1eb24f00b.
+                (define (runpath-of lib)
+                  (call-with-input-file lib
+                    (compose elf-dynamic-info-runpath elf-dynamic-info
+                             parse-elf get-bytevector-all)))
+                (define (runpaths-of-input label)
+                  (let* ((dir (string-append (assoc-ref inputs label)
+                                             "/lib"))
+                         (libs (find-files dir "\\.so$")))
+                    (append-map runpath-of libs)))
+                (let* ((out (assoc-ref outputs "out"))
+                       (lib (string-append out "/lib"))
+                       (libs (map
+                              (lambda (lib-name)
+                                (string-append (assoc-ref inputs
+                                                          lib-name)
+                                               "/lib"))
+                              '("mesa" "libpng-apng" "libnotify" "libva"
+                                "pulseaudio" "gtk+" "pipewire"
+                                ;; For U2F and WebAuthn
+                                "eudev")))
+
+                       ;; VA-API is run in the RDD (Remote Data Decoder) sandbox
+                       ;; and must be explicitly given access to files it needs.
+                       ;; Rather than adding the whole store (as Nix had
+                       ;; upstream do, see
+                       ;; <https://github.com/NixOS/nixpkgs/pull/165964> and
+                       ;; linked upstream patches), we can just follow the
+                       ;; runpaths of the needed libraries to add everything to
+                       ;; LD_LIBRARY_PATH.  These will then be accessible in the
+                       ;; RDD sandbox.
+                       (rdd-whitelist (map (cut string-append <> "/")
+                                           (delete-duplicates (append-map
+                                                               runpaths-of-input
+                                                               '("mesa"
+                                                                 "ffmpeg")))))
+                       (gtk-share (string-append (assoc-ref inputs
+                                                            "gtk+")
+                                                 "/share")))
+                  (wrap-program (car (find-files lib "^librewolf$"))
+                    `("LD_LIBRARY_PATH" prefix
+                      (,@libs ,@rdd-whitelist))
+                    `("XDG_DATA_DIRS" prefix
+                      (,gtk-share))
+                    `("MOZ_LEGACY_PROFILES" =
+                      ("1"))
+                    `("MOZ_ALLOW_DOWNGRADE" =
+                      ("1"))))))
+            (add-after 'wrap-program 'install-desktop-entry
+              (lambda* (#:key outputs #:allow-other-keys)
+                (let* ((desktop-file
+                        "taskcluster/docker/firefox-snap/firefox.desktop")
+                       (applications (string-append #$output
+                                                    "/share/applications")))
+                  (substitute* desktop-file
+                    (("^Exec=firefox")
+                     (string-append "Exec="
+                                    #$output "/bin/librewolf"))
+                    ;; "Firefox" -> "LibreWolf" everywhere
+                    (("Firefox")
+                     "LibreWolf")
+                    ;; Remove non-Latin translations.
+                    (("^Name\\[(ar|bn)\\].*$")
+                     "")
+                    (("^Icon=.*")
+                     (string-append "Icon="
+                                    #$output
+                                    "/share/icons/hicolor/128x128/apps/librewolf.png
 "))
-                           ;; These commands were changed.
-                           (("-NewWindow")
-                            "-new-window")
-                           (("-NewPrivateWindow")
-                            "-new-private-window")
-                           (("StartupNotify=true")
-                            "StartupNotify=true
+                    ;; These commands were changed.
+                    (("-NewWindow")
+                     "-new-window")
+                    (("-NewPrivateWindow")
+                     "-new-private-window")
+                    (("StartupNotify=true")
+                     "StartupNotify=true
 StartupWMClass=Navigator"))
-                         (copy-file desktop-file "librewolf.desktop")
-                         (install-file "librewolf.desktop" applications))))
-                   (add-after 'install-desktop-entry 'install-icons
-                     (lambda* (#:key outputs #:allow-other-keys)
-                       (let ((icon-source-dir (string-append #$output
-                                               "/lib/librewolf/browser/"
-                                               "chrome/icons/default")))
-                         (for-each (lambda (size)
-                                     (let ((dest (string-append #$output
-                                                  "/share/icons/hicolor/"
-                                                  size
-                                                  "x"
-                                                  size
-                                                  "/apps")))
-                                       (mkdir-p dest)
-                                       (symlink (string-append icon-source-dir
-                                                 "/default" size ".png")
-                                                (string-append dest
-                                                 "/librewolf.png"))))
-                                   '("16" "32" "48" "64" "128"))))))
-
-      ;; Test will significantly increase build time but with little rewards.
-      #:tests? #f
-
-      ;; WARNING: Parallel build will consume lots of memory!
-      ;; If you have encountered OOM issue in build phase, try disable it.
-      #:parallel-build? #t
-
-      ;; Some dynamic lib was determined at runtime, so rpath check may fail.
-      #:validate-runpath? #f))
-    (inputs (list bash-minimal
-                  bzip2
-                  cairo
-                  cups
-                  dbus-glib
-                  freetype
-                  ffmpeg
-                  gdk-pixbuf
-                  glib
-                  gtk+
-                  gtk+-2
-                  hunspell
-                  icu4c-73
-                  jemalloc
-                  libcanberra
-                  libevent
-                  libffi
-                  libgnome
-                  libjpeg-turbo
-                  libnotify
-                  libpng-apng
-                  libva
-                  libvpx
-                  libwebp
-                  libxcomposite
-                  libxft
-                  libxinerama
-                  libxscrnsaver
-                  libxt
-                  mesa
-                  mit-krb5
-                  nspr
-                  nss/fixed
-                  pango
-                  pciutils
-                  pipewire
-                  pixman
-                  pulseaudio
-                  speech-dispatcher
-                  sqlite
-                  startup-notification
-                  eudev
-                  unzip
-                  zip
-                  zlib))
-    (native-inputs (list alsa-lib
-                         autoconf-2.13
-                         `(,rust-librewolf "cargo")
-                         clang-18
-                         llvm-18
-                         m4
-                         nasm
-                         node-lts
-                         perl
-                         pkg-config
-                         python
-                         rust-librewolf
-                         rust-cbindgen-0.26
-                         which
-                         yasm))
-    (home-page "https://librewolf.net/")
-    (synopsis
-     "Custom version of Firefox, focused on privacy, security and freedom")
-    (description
-     "LibreWolf is designed to increase protection against tracking and
+                  (copy-file desktop-file "librewolf.desktop")
+                  (install-file "librewolf.desktop" applications))))
+            (add-after 'install-desktop-entry 'install-icons
+              (lambda* (#:key outputs #:allow-other-keys)
+                (let ((icon-source-dir (string-append #$output
+                                                      "/lib/librewolf/browser/"
+                                                      "chrome/icons/default")))
+                  (for-each (lambda (size)
+                              (let ((dest (string-append #$output
+                                                         "/share/icons/hicolor/"
+                                                         size
+                                                         "x"
+                                                         size
+                                                         "/apps")))
+                                (mkdir-p dest)
+                                (symlink (string-append icon-source-dir
+                                                        "/default" size ".png")
+                                         (string-append dest
+                                                        "/librewolf.png"))))
+                            '("16" "32" "48" "64" "128"))))))
+
+        ;; Test will significantly increase build time but with little rewards.
+        #:tests? #f
+
+        ;; WARNING: Parallel build will consume lots of memory!
+        ;; If you have encountered OOM issue in build phase, try disable it.
+        #:parallel-build? #t
+
+        ;; Some dynamic lib was determined at runtime, so rpath check may fail.
+        #:validate-runpath? #f))
+      (inputs (list bash-minimal
+                    bzip2
+                    cairo
+                    cups
+                    dbus-glib
+                    freetype
+                    ffmpeg
+                    gdk-pixbuf
+                    glib
+                    gtk+
+                    gtk+-2
+                    hunspell
+                    icu4c-73
+                    jemalloc
+                    libcanberra
+                    libevent
+                    libffi
+                    libgnome
+                    libjpeg-turbo
+                    libnotify
+                    libpng-apng
+                    libva
+                    libvpx
+                    libwebp
+                    libxcomposite
+                    libxft
+                    libxinerama
+                    libxscrnsaver
+                    libxt
+                    mesa
+                    mit-krb5
+                    nspr
+                    nss-latest
+                    pango
+                    pciutils
+                    pipewire
+                    pixman
+                    pulseaudio
+                    speech-dispatcher
+                    sqlite
+                    startup-notification
+                    eudev
+                    unzip
+                    zip
+                    zlib))
+      (native-inputs (list alsa-lib
+                           autoconf-2.13
+                           `(,rust-librewolf "cargo")
+                           clang-18
+                           llvm-18
+                           m4
+                           nasm
+                           node-lts
+                           perl
+                           pkg-config
+                           python
+                           rust-librewolf
+                           rust-cbindgen-0.26
+                           which
+                           yasm))
+      (home-page "https://librewolf.net/")
+      (synopsis
+       "Custom version of Firefox, focused on privacy, security and freedom")
+      (description
+       "LibreWolf is designed to increase protection against tracking and
 fingerprinting techniques, while also including a few security improvements.
 This is achieved through our privacy and security oriented settings and
 patches.  LibreWolf also aims to remove all the telemetry, data collection and
 annoyances, as well as disabling anti-freedom features like DRM.")
-    (license license:mpl2.0)))
+      (license license:mpl2.0))))
-- 
2.45.1





^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-07-02  0:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-29  3:57 [bug#71832] [PATCH 0/2] Add nss-latest; updte Librewolf to 127.0.2-2 Ian Eure
2024-06-29  3:59 ` [bug#71832] [PATCH 1/2] gnu: Add nss-latest Ian Eure
2024-06-29  3:59   ` [bug#71832] [PATCH 2/2] gnu: librewolf: Update to 127.0.2-1 Ian Eure
2024-06-29 17:22 ` [bug#71832] [PATCH v2 0/2] Add nss-latest; update Librewolf to 127.0.2-2 Ian Eure
2024-06-29 17:22   ` [bug#71832] [PATCH v2 1/2] gnu: Add nss-latest Ian Eure
2024-06-29 17:22   ` [bug#71832] [PATCH v2 2/2] gnu: librewolf: Update to 127.0.2-1 Ian Eure
2024-07-02  0:21 ` [bug#71832] [PATCH v3 0/2] Add nss-rapid; updte Librewolf to 127.0.2-2 Ian Eure
2024-07-02  0:21   ` [bug#71832] [PATCH v3 1/2] gnu: Add nss-rapid Ian Eure
2024-07-02  0:21   ` [bug#71832] [PATCH v3 2/2] gnu: librewolf: Update to 127.0.2-1 Ian Eure

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.