gnu: mono: Make build reproducible.
[jackhill/guix/guix.git] / gnu / packages / gnuzilla.scm
index b4789d6..d6b1f4c 100644 (file)
@@ -3,11 +3,12 @@
 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015, 2016, 2017, 2018 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
-;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2017 Nils Gillmann <ng0@n0.is>
 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system cargo)
+  #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages check)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages assembly)
+  #:use-module (gnu packages rust)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages video)
+  #:use-module (gnu packages xiph)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages readline))
 
@@ -252,10 +259,76 @@ in C/C++.")
        ("icu4c" ,icu4c)
        ("zlib" ,zlib)))))
 
+(define-public mozjs-52
+  ;; No releases yet at <https://archive.mozilla.org/pub/spidermonkey/releases/>.
+  ;; While we could take a snapshot of the complete mozilla-esr52 repository at
+  ;; <https://treeherder.mozilla.org/#/jobs?repo=mozilla-esr52&filter-searchStr=sm-tc>,
+  ;; we take the Debian version instead, because it is easier to work with.
+  (let ((commit "6507e63cc416fd7a3269e390efe712f8b56f374a")
+        (revision "1"))
+    (package (inherit mozjs-38)
+      (version (git-version "52.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://salsa.debian.org/gnome-team/mozjs52.git")
+                      (commit commit)))
+                (file-name (git-file-name "mozjs" version))
+                (sha256
+                 (base32
+                  "1ny0s53r8wn4byys87h784xrq1xg767akmfm6gqrbvrz57mlm3q2"))))
+      (arguments
+       `(#:tests? #f ; depends on repository metadata
+         #:configure-flags
+         '("--enable-ctypes"
+           "--enable-optimize"
+           "--enable-pie"
+           "--enable-readline"
+           "--enable-shared-js"
+           "--enable-system-ffi"
+           "--with-system-icu"
+           "--with-system-nspr"
+           "--with-system-zlib"
+
+           ;; Intl API requires bundled ICU.
+           "--without-intl-api")
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'patch-and-chdir
+             (lambda* (#:key inputs #:allow-other-keys)
+               ;; This patch prevents a segfault when executing JS_Init().
+               ;; The build does not fail without this patch, but the
+               ;; configure phase of the gjs package would fail.
+               ;; See https://bugzilla.mozilla.org/show_bug.cgi?id=1176787
+               (make-file-writable "js/src/old-configure.in")
+               (make-file-writable "js/src/old-configure")
+               (make-file-writable "mozglue/build/moz.build")
+               (invoke "patch" "-p1" "--force"
+                       "--input" "debian/patches/disable-mozglue.patch")
+               (invoke "touch" "js/src/configure")
+               (chdir "js/src")
+               #t))
+           (replace 'configure
+             (lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
+               ;; The configure script does not accept environment variables
+               ;; as arguments.
+               (let ((out (assoc-ref outputs "out")))
+                 (setenv "SHELL" (which "sh"))
+                 (setenv "CONFIG_SHELL" (which "sh"))
+                 (setenv "AUTOCONF" (string-append (assoc-ref inputs "autoconf")
+                                                   "/bin/autoconf"))
+                 (apply invoke "./configure"
+                        (cons (string-append "--prefix=" out)
+                              configure-flags))))))))
+      (native-inputs
+       `(("autoconf" ,autoconf-2.13)
+         ("automake" ,automake)
+         ,@(package-native-inputs mozjs-38))))))
+
 (define-public nspr
   (package
     (name "nspr")
-    (version "4.19")
+    (version "4.20")
     (source (origin
              (method url-fetch)
              (uri (string-append
@@ -263,7 +336,7 @@ in C/C++.")
                    version "/src/nspr-" version ".tar.gz"))
              (sha256
               (base32
-               "0agpv3f17h8kmzi0ifibaaxc1k3xc0q61wqw3l6r2xr2z8bmkn9f"))))
+               "0vjms4j75zvv5b2siyafg7hh924ysx2cwjad8spzp7x87n8n929c"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("perl" ,perl)))
@@ -291,7 +364,7 @@ in the Mozilla clients.")
 (define-public nss
   (package
     (name "nss")
-    (version "3.36")
+    (version "3.39")
     (source (origin
               (method url-fetch)
               (uri (let ((version-with-underscores
@@ -302,7 +375,7 @@ in the Mozilla clients.")
                       "nss-" version ".tar.gz")))
               (sha256
                (base32
-                "1580qc0a4s8v3k3vg7zz4xly4alkjrw7qq9zy2nf6p4v56wcfg53"))
+                "0jw6qlfl2g47hhx056nvnj6h92bk3sn46hy3ig61a911dzblvrkb"))
               ;; Create nss.pc and nss-config.
               (patches (search-patches "nss-pkgconfig.patch"
                                        "nss-increase-test-timeout.patch"))))
@@ -345,7 +418,12 @@ in the Mozilla clients.")
              (setenv "DOMSUF" "(none)")
              (setenv "USE_IP" "TRUE")
              (setenv "IP_ADDRESS" "127.0.0.1")
-             (invoke "./nss/tests/all.sh")))
+
+             ;; 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" "2018-09-01" "./nss/tests/all.sh")))
            (replace 'install
              (lambda* (#:key outputs #:allow-other-keys)
                (let* ((out (assoc-ref outputs "out"))
@@ -381,7 +459,8 @@ in the Mozilla clients.")
      `(("sqlite" ,sqlite)
        ("zlib" ,zlib)))
     (propagated-inputs `(("nspr" ,nspr))) ; required by nss.pc.
-    (native-inputs `(("perl" ,perl)))
+    (native-inputs `(("perl" ,perl)
+                     ("libfaketime" ,libfaketime))) ;for tests
 
     ;; The NSS test suite takes around 48 hours on Loongson 3A (MIPS) when
     ;; another build is happening concurrently on the same machine.
@@ -399,10 +478,10 @@ security standards.")
     (license license:mpl2.0)))
 
 (define (mozilla-patch file-name changeset hash)
-  "Return an origin for CHANGESET from the mozilla-esr52 repository."
+  "Return an origin for CHANGESET from the mozilla-esr60 repository."
   (origin
     (method url-fetch)
-    (uri (string-append "https://hg.mozilla.org/releases/mozilla-esr52/raw-rev/"
+    (uri (string-append "https://hg.mozilla.org/releases/mozilla-esr60/raw-rev/"
                         changeset))
     (sha256 (base32 hash))
     (file-name file-name)))
@@ -410,7 +489,7 @@ security standards.")
 (define-public icecat
   (package
     (name "icecat")
-    (version "52.6.0-gnu1")
+    (version "60.3.0-gnu1")
     (source
      (origin
       (method url-fetch)
@@ -419,46 +498,24 @@ security standards.")
                           "/" name "-" version ".tar.bz2"))
       (sha256
        (base32
-        "09fn54glqg1aa93hnz5zdcy07cps09dbni2b4200azh6nang630a"))
+        "0icnl64nxcyf7dprpdpygxhabsvyhps8c3ixysj9bcdlj9q34ib1"))
       (patches
        (list
-        (search-patch "icecat-avoid-bundled-libraries.patch")
-        (search-patch "icecat-use-system-harfbuzz.patch")
-        (search-patch "icecat-use-system-graphite2.patch")
-        (mozilla-patch "icecat-bug-546387.patch"         "d13e3fefb76e" "1b760r0bg2ydbl585wlmajljh1nlisrwxvjws5b28a3sgjy01i6k")
-        (mozilla-patch "icecat-bug-1350152.patch"        "f822bda79c28" "1wf56169ca874shr6r7qx40s17h2gwj7ngmpyylrpmd1c6hipvsj")
-        (mozilla-patch "icecat-bug-1411708.patch"        "34c968767eb7" "0l2jy201ikj3m3h66mvlsj4y0ki7cpm7x7nnfygbwnfxg42s1sip")
-        (mozilla-patch "icecat-bug-1375217.patch"        "00fc630c9a46" "17pcprp452nslk6sac6sili0p74zh8w3g0v1wsdn0ikm9xmnphhv")
-        (mozilla-patch "icecat-CVE-2018-5145.patch"      "f0ec180993d2" "0jiazxcwki83wr00fyh2g518ynsd33p7nk65zk4d1682gn22lc8v")
-        (mozilla-patch "icecat-CVE-2018-5130.patch"      "a6a9e26688c1" "0cvizvilb4k422j2gzqcbakznvsffmk6n6xn1ayj5rgxfaizkkqk")
-        (mozilla-patch "icecat-CVE-2018-5125-pt1.patch"  "198ad052621e" "1721zx8hifdlflrhvw6hmkdgjbvsmxl9n84iji5qywhlp2krdk9r")
-        (mozilla-patch "icecat-bug-1426087.patch"        "391ea77ebfdb" "1fhkvd0z6mvdkj7m0d3jlj42rsdw5r4x122c1wb1i428228ifw6n")
-        (mozilla-patch "icecat-bug-1416307.patch"        "54f2f7f93b30" "1ncjir16mqya37wgf6fy2rqki3vl433c4grjr3fypmlig6xfgg1l")
-        (mozilla-patch "icecat-CVE-2018-5127.patch"      "2c4d7a59041b" "178c6gid89cvw52yqs43i6x6s5w0hslj0rfa2r8b4762ij3civ92")
-        (mozilla-patch "icecat-CVE-2018-5125-pt2.patch"  "f87ef3774d5e" "0payf3az2w93nzl5qknqx290jbxk8v39rwhdgq7wyd5f245dywxk")
-        (mozilla-patch "icecat-CVE-2018-5125-pt3.patch"  "ac743923f81d" "0msyr45xr1j5q4x6ah4r907pwjngyi0k6pp9y8ixk21cnwbzrdwx")
-        (mozilla-patch "icecat-CVE-2018-5129.patch"      "456913d7e8b5" "0fx0s06kxxj7g4hllinaskgh41z3k48zml6yqqzxx485qk3hdh9x")
-        (mozilla-patch "icecat-bug-1334465-pt1.patch"    "f95c5b881442" "0iaddhf65jd9cycj4bw0b207n2jiqkr4q84jifzyqn4ygs75wdqd")
-        (mozilla-patch "icecat-bug-1334465-pt2.patch"    "8a4265c8fb41" "1d9zfdbrlw9wzr84b7pj7lxgy487lsx0kfd89287hjk0al8m6vrw")
-        (mozilla-patch "icecat-bug-1398021.patch"        "28855df568d8" "1kmq836gniplxpjnvq8lhbcc1aqi56al628r1mzdy94b5yb0lis3")
-        (mozilla-patch "icecat-bug-1388020.patch"        "e8ab2736499b" "0n28vcd65rxsyq3z22rfcfksryfndhm1i3g6ah3akg11jnagqf5v")
-        (mozilla-patch "icecat-CVE-2018-5125-pt4.patch"  "014877bf17ea" "0hk90pnf7h7kvidji6ydvva1zpyraipn03pjhvprdqr7k2fqzmsz")
-        (mozilla-patch "icecat-CVE-2018-5125-pt5.patch"  "5b3a5de48912" "1ifya05rcd34ryp9zawdacihhkkf2m0xn2q8m8c6v78bvxj0mgig")
-        (mozilla-patch "icecat-CVE-2018-5144.patch"      "1df9b4404acd" "1sd59vsarfsbh3vlrzrqv6n1ni7vxdzm83j6s6g0fygl1h8kwijg")
-        (mozilla-patch "icecat-bug-1430173-pt1.patch"    "9124c3972e2b" "13ns5yy39yzfx7lrkv4rgwdz6s6q0z4i09wkbxdvnkfsz17cd17i")
-        (mozilla-patch "icecat-bug-1430173-pt2.patch"    "9f6dc031be51" "0bv2p98z5ahp3x9wxnhwxn87g21djvzzp7jy55ik90hqixsbhwdl")
-        (mozilla-patch "icecat-CVE-2018-5131.patch"      "3102fbb97b32" "0kg0183v92gxjb9255xjwhxyd6gl77l9c0civx3040k975fybwlp")
-        (mozilla-patch "icecat-CVE-2018-5125-pt6.patch"  "4904c0f4a645" "0lsq62ynksy1fbw0m87f1d741fyvrrp1vrznx5hx0l2p4g4frhv3")
-        (mozilla-patch "icecat-CVE-2018-5125-pt7.patch"  "16b8073d5c30" "1dv94qqah1wjd3bxjvrkmjbb2f95d3d11zpm8mggdk52il575bwl")
-        (mozilla-patch "icecat-bug-1442127-pt1.patch"    "f931f85b09da" "02s380w8a73g4w2wm810lbigh4z4rrlfy10ywwhv4lpkbk8xg7pr")
-        (mozilla-patch "icecat-bug-1442127-pt2.patch"    "da5792b70f30" "116k9qja5ir9b3laazasp43f5jx59qq72nknmq5bn5v1ixya9r4l")
-        (mozilla-patch "icecat-CVE-2018-5125-pt8.patch"  "62b831df8269" "109pn0hqn7s27580glv4z7qv1pmjzii9szvf3wkn97k5wybrzgkx")
-        (mozilla-patch "icecat-bug-1442504.patch"        "8954ce68a364" "0bl65zw82bwqg0mmcri94pxqq6ibff7y5rclkzapb081p6yvf73q")
-        (mozilla-patch "icecat-CVE-2018-5125-pt9.patch"  "8a16f439117c" "108iarql6z7h1r4rlzac6n6lrzs78x7kcdbfa0b5dbr5xc66jmgb")
-        (mozilla-patch "icecat-bug-1426603.patch"        "ca0b92ecedee" "0dc3mdl4a3hrq4j384zjavf3splj6blv4masign710hk7svlgbhq")
-        (mozilla-patch "icecat-CVE-2018-5146.patch"      "494e5d5278ba" "1yb4lxjw499ppwhk31vz0vzl0cfqvj9d4jwqag7ayj53ybwsqgjr")
-        (mozilla-patch "icecat-CVE-2018-5147.patch"      "5cd5586a2f48" "10s774pwvj6xfk3kk6ivnhp2acc8x9sqq6na8z47nkhgwl2712i5")
-        (mozilla-patch "icecat-CVE-2018-5148.patch"      "c3e447e07077" "0gmwy631f8ip4gr1mpbjk8bx1n1748wdls5zq4y8hpmpnq5g1wyx")))
+        (search-patch  "icecat-avoid-bundled-libraries.patch")
+        (search-patch  "icecat-use-system-graphite2+harfbuzz.patch")
+        (search-patch  "icecat-use-system-media-libs.patch")
+        (mozilla-patch "icecat-bug-1464061.patch"         "d28761dbff18" "1f58rzwx4s1af66fdwn9lgkcd1ksmq8kn8imvf78p90jqi24h7b4")
+        (mozilla-patch "icecat-bug-1479853.patch"         "4faeb696dd06" "12891xx9c15s6kby6d3zk64v5nqgaq7sw597zv1fkd3a6x69hlva")
+        (mozilla-patch "icecat-bug-1488295.patch"         "12ba39f69876" "1piyq44f0xa0a9z2748aqwpaziaxwp61d86gyhalbyag8lcxfb3p")
+        (mozilla-patch "icecat-bug-1500011.patch"         "a0adabeedf26" "0f5wazha3zxzhy2j8f93hx62l9p02b1p40vi07qah3ar67h4ccj9")
+        (mozilla-patch "icecat-bug-1503082.patch"         "19604eb26230" "1wqxgph4z14ijhk2j2m4av5p6gx72d02lzz83q6yy0k065kw8psb")
+        (mozilla-patch "icecat-bug-1499861.patch"         "98737ab09270" "0fyl6wv0jxcxpkfpsff46y93k49n8lrw0k7c1p45g8da015dx27a")
+        (mozilla-patch "icecat-bug-1504452.patch"         "1cf7d80355d5" "19jp4x32vyxam54d1r9fm7jwf6krhhf3xazfqmxb9aw4iwdil7dl")
+        (mozilla-patch "icecat-bug-1494752.patch"         "c264774b8913" "1hxyi131x8jwawrq90cgkph833iv9ixrdrgzl1r978gbzwq10xz2")
+        (mozilla-patch "icecat-bug-1477773.patch"         "ec13fda7c9b0" "0zj7aylgw55g0y7plaafn5gq8jwcsdr1bpdxacs0hq914nm8zy9z")
+        (mozilla-patch "icecat-bug-1500759.patch"         "5e1a9644aeef" "1qimrpgyrd8zkiri7w57j0aymk20y9b34am5w7rvr6qj1lhrbfla")
+        (mozilla-patch "icecat-bug-1485655.patch"         "9055726e2d89" "1pppxr94zqh6zmi2mn1ih21qap09vk5ivbhnwxqr8iszvygjg44g")
+        (mozilla-patch "icecat-bug-1410214.patch"         "9e641345e2ef" "0542xss2jdb8drh4g50cfy32l300x69dyywgx3dqs03vgr3qplxy")))
       (modules '((guix build utils)))
       (snippet
        '(begin
@@ -475,15 +532,24 @@ security standards.")
                       ;; FIXME: A script from the bundled nspr is used.
                       ;;"nsprpub"
                       ;;
-                      ;; TODO: Use system media libraries.  Waiting for:
+                      ;; FIXME: With the update to IceCat 60, using system NSS
+                      ;;        broke certificate validation.  See
+                      ;;        <https://bugs.gnu.org/32833>.  For now, we use
+                      ;;        the bundled NSPR and NSS.  TODO: Investigate,
+                      ;;        and try to unbundle these libraries again.
+                      ;; UNBUNDLE-ME! "security/nss"
+                      ;;
+                      ;; TODO: Use more system media libraries.  See:
                       ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=517422>
-                      ;;   * libogg
-                      ;;   * libtheora
-                      ;;   * libvorbis
-                      ;;   * libtremor (not yet in guix)
+                      ;;   * libtheora: esr60 wants v1.2, not yet released.
+                      ;;   * soundtouch: avoiding the bundled library would
+                      ;;     result in some loss of functionality.  There's
+                      ;;     also an issue with exception handling
+                      ;;     configuration.  It seems that this is needed in
+                      ;;     some moz.build:
+                      ;;       DEFINES['ST_NO_EXCEPTION_HANDLING'] = 1
                       ;;   * libopus
                       ;;   * speex
-                      ;;   * soundtouch (not yet in guix)
                       ;;
                       "modules/freetype2"
                       "modules/zlib"
@@ -491,8 +557,10 @@ security standards.")
                       "ipc/chromium/src/third_party/libevent"
                       "media/libjpeg"
                       "media/libvpx"
-                      "security/nss"
-                      "gfx/cairo"
+                      "media/libogg"
+                      "media/libvorbis"
+                      ;; "media/libtheora" ; wants theora-1.2, not yet released
+                      "media/libtremor"
                       "gfx/harfbuzz"
                       "gfx/graphite2"
                       "js/src/ctypes/libffi"
@@ -508,7 +576,6 @@ security standards.")
     (inputs
      `(("alsa-lib" ,alsa-lib)
        ("bzip2" ,bzip2)
-       ("cairo" ,cairo)
        ("cups" ,cups)
        ("dbus-glib" ,dbus-glib)
        ("gdk-pixbuf" ,gdk-pixbuf)
@@ -523,8 +590,11 @@ security standards.")
        ("libcanberra" ,libcanberra)
        ("libgnome" ,libgnome)
        ("libjpeg-turbo" ,libjpeg-turbo)
+       ("libogg" ,libogg)
+       ;; ("libtheora" ,libtheora) ; wants theora-1.2, not yet released
+       ("libvorbis" ,libvorbis)
        ("libxft" ,libxft)
-       ("libevent" ,libevent-2.0)
+       ("libevent" ,libevent)
        ("libxinerama" ,libxinerama)
        ("libxscrnsaver" ,libxscrnsaver)
        ("libxcomposite" ,libxcomposite)
@@ -537,15 +607,20 @@ security standards.")
        ("pulseaudio" ,pulseaudio)
        ("mesa" ,mesa)
        ("mit-krb5" ,mit-krb5)
-       ("nspr" ,nspr)
-       ("nss" ,nss)
+       ;; See <https://bugs.gnu.org/32833>
+       ;;   and related comments in the 'snippet' above.
+       ;; UNBUNDLE-ME! ("nspr" ,nspr)
+       ;; UNBUNDLE-ME! ("nss" ,nss)
        ("sqlite" ,sqlite)
        ("startup-notification" ,startup-notification)
        ("unzip" ,unzip)
        ("zip" ,zip)
        ("zlib" ,zlib)))
     (native-inputs
-     `(("perl" ,perl)
+      ;; Icecat 60 checkes for rust>=1.24
+     `(("rust" ,rust-1.24)
+       ("cargo" ,rust-1.24 "cargo")
+       ("perl" ,perl)
        ("python" ,python-2) ; Python 3 not supported
        ("python2-pysqlite" ,python2-pysqlite)
        ("yasm" ,yasm)
@@ -562,13 +637,24 @@ security standards.")
        ;; practice somehow.  See <http://hydra.gnu.org/build/378133>.
        #:validate-runpath? #f
 
+       #:imported-modules ,%cargo-build-system-modules ;for `generate-checksums'
+
        #:configure-flags '("--enable-default-toolkit=cairo-gtk3"
-                           "--enable-gio"
+
+                           "--with-distribution-id=org.gnu"
+
                            "--enable-startup-notification"
                            "--enable-pulseaudio"
 
+                           "--disable-tests"
+                           "--disable-updater"
+                           "--disable-crashreporter"
+                           "--disable-maintenance-service"
+                           "--disable-eme"
                            "--disable-gconf"
-                           "--disable-gnomeui"
+
+                           ;; Stylo requires LLVM/clang.  For now, disable it.
+                           "--disable-stylo"
 
                            ;; Building with debugging symbols takes ~5GiB, so
                            ;; disable it.
@@ -584,14 +670,20 @@ security standards.")
                            "--with-system-bz2"
                            "--with-system-jpeg"        ; must be libjpeg-turbo
                            "--with-system-libevent"
+                           "--with-system-ogg"
+                           "--with-system-vorbis"
+                           ;; "--with-system-theora" ; wants theora-1.2, not yet released
                            "--with-system-libvpx"
                            "--with-system-icu"
-                           "--with-system-nspr"
-                           "--with-system-nss"
+                           
+                           ;; See <https://bugs.gnu.org/32833>
+                           ;;   and related comments in the 'snippet' above.
+                           ;; UNBUNDLE-ME! "--with-system-nspr"
+                           ;; UNBUNDLE-ME! "--with-system-nss"
+                           
                            "--with-system-harfbuzz"
                            "--with-system-graphite2"
                            "--enable-system-pixman"
-                           "--enable-system-cairo"
                            "--enable-system-ffi"
                            "--enable-system-hunspell"
                            "--enable-system-sqlite"
@@ -626,20 +718,7 @@ security standards.")
                          #t))
               #t)))
          (add-after
-          'unpack 'use-skia-by-default
-          (lambda _
-            ;; Use the bundled Skia library by default, since IceCat appears
-            ;; to be far more stable when using it than when using our system
-            ;; Cairo.
-            (let ((out (open "browser/app/profile/icecat.js"
-                              (logior O_WRONLY O_APPEND))))
-              (format out "~%// Use Skia by default~%")
-              (format out "pref(~s, ~s);~%" "gfx.canvas.azure.backends" "skia")
-              (format out "pref(~s, ~s);~%" "gfx.content.azure.backends" "skia")
-              (close-port out))
-            #t))
-         (add-after
-          'unpack 'arrange-to-link-libxul-with-libraries-it-might-dlopen
+          'unpack 'link-libxul-with-libraries
           (lambda _
             ;; libxul.so dynamically opens libraries, so here we explicitly
             ;; link them into libxul.so instead.
@@ -654,6 +733,27 @@ security standards.")
     'avcodec', 'avutil', 'pulse' ]\n\n"
                               all)))
             #t))
+         (replace 'bootstrap
+           (lambda _
+             (invoke "sh" "-c" "autoconf old-configure.in > old-configure")))
+         (add-after 'patch-source-shebangs 'patch-cargo-checksums
+           (lambda _
+             (use-modules (guix build cargo-build-system))
+             (let ((null-file "/dev/null")
+                   (null-hash "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"))
+               (substitute* '("Cargo.lock" "servo/Cargo.lock")
+                 (("(\"checksum .* = )\".*\"" all name)
+                  (string-append name "\"" null-hash "\"")))
+               (for-each
+                (lambda (filename)
+                  (delete-file filename)
+                  (let ((dir (dirname filename)))
+                    (display (string-append
+                              "patch-cargo-checksums: generate-checksums for "
+                              dir "\n"))
+                    (generate-checksums dir null-file)))
+                (find-files "third_party/rust" ".cargo-checksum.json")))
+             #t))
          (replace
           'configure
           ;; configure does not work followed by both "SHELL=..." and