summary refs log tree commit diff
path: root/gnu/packages/chromium.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/chromium.scm')
-rw-r--r--gnu/packages/chromium.scm115
1 files changed, 66 insertions, 49 deletions
diff --git a/gnu/packages/chromium.scm b/gnu/packages/chromium.scm
index 005b21ad7b..a1e40b9ba0 100644
--- a/gnu/packages/chromium.scm
+++ b/gnu/packages/chromium.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -98,6 +99,7 @@
     "third_party/angle/third_party/vulkan-tools" ;ASL2.0
     "third_party/angle/third_party/vulkan-validation-layers" ;ASL2.0
     "third_party/apple_apsl" ;APSL2.0
+    "third_party/axe-core" ;MPL2.0
     "third_party/blink" ;BSD-3, LGPL2+
     "third_party/boringssl" ;OpenSSL/ISC (Google additions are ISC)
     "third_party/boringssl/src/third_party/fiat" ;Expat
@@ -117,13 +119,14 @@
     "third_party/ced" ;BSD-3
     "third_party/cld_3" ;ASL2.0
     "third_party/crashpad" ;ASL2.0
+    "third_party/crashpad/crashpad/third_party/lss" ;ASL2.0
     "third_party/crashpad/crashpad/third_party/zlib/zlib_crashpad.h" ;Zlib
     "third_party/crc32c" ;BSD-3
     "third_party/cros_system_api" ;BSD-3
     "third_party/dav1d" ;BSD-2
+    "third_party/dawn" ;ASL2.0
     "third_party/dom_distiller_js" ;BSD-3
     "third_party/emoji-segmenter" ;ASL2.0
-    "third_party/fips181" ;BSD-3
     "third_party/flatbuffers" ;ASL2.0
     "third_party/glslang" ;BSD-3, Expat, ASL2.0
     "third_party/google_input_tools" ;ASL2.0
@@ -166,6 +169,7 @@
     "third_party/pdfium/third_party/bigint" ;Public domain, BSD-3
     "third_party/pdfium/third_party/skia_shared" ;BSD-3
     "third_party/pdfium/third_party/freetype/include/pstables.h" ;FreeType
+    "third_party/pffft" ;the "FFTPACK" license, similar to BSD-3
     "third_party/ply" ;BSD-3
     "third_party/polymer" ;BSD-3
     "third_party/protobuf" ;BSD-3
@@ -223,54 +227,58 @@ from forcing GEXP-PROMISE."
                       #:system system
                       #:guile-for-build guile)))
 
-(define %chromium-version "74.0.3729.169")
-(define %ungoogled-revision "d2beaeff47a6e97b8909163147ad6b4058238f36")
-(define %debian-revision "debian/74.0.3729.108-1")
+(define %chromium-version "75.0.3770.100")
+(define %ungoogled-revision "5d8abc38b43a62f379615a0dc972b29d9aebb4b4")
+(define %debian-revision "debian/75.0.3770.90-1")
 (define package-revision "0")
-
 (define %package-version (string-append %chromium-version "-"
                                         package-revision "."
                                         (string-take %ungoogled-revision 7)))
 
+(define %chromium-origin
+  (origin
+    (method url-fetch)
+    (uri (string-append "https://commondatastorage.googleapis.com"
+                        "/chromium-browser-official/chromium-"
+                        %chromium-version ".tar.xz"))
+    (sha256
+     (base32
+      "187wfdxw6ji4302pbn0kyi9b859ydri7gns0wlsrd7vd3c8604wy"))))
+
+(define %ungoogled-origin
+  (origin
+    (method git-fetch)
+    (uri (git-reference (url "https://github.com/Eloston/ungoogled-chromium")
+                        (commit %ungoogled-revision)))
+    (file-name (git-file-name "ungoogled-chromium"
+                              (string-take %ungoogled-revision 7)))
+    (sha256
+     (base32
+      "1vk8jzzsn20ysn4nlz84mwwhfa9nnywzd1lrahlhcky9pf6xzpwa"))))
+
+(define %debian-origin
+  (origin
+    (method git-fetch)
+    (uri (git-reference
+          (url "https://salsa.debian.org/chromium-team/chromium.git")
+          (commit %debian-revision)))
+    (file-name (git-file-name "debian-chromium-packaging"
+                              (if (string-prefix? "debian/" %debian-revision)
+                                  (cadr (string-split %debian-revision #\/))
+                                  (string-take %debian-revision 7))))
+    (sha256
+     (base32
+      "0sh6z2lx44zb31qrpa29vm0sw09dxi7i9h6fsq3ivfxjs7v98bbx"))))
+
 ;; This is a "computed" origin that does the following:
 ;; *) Runs the Ungoogled scripts on a pristine Chromium tarball.
 ;; *) Applies Debians Chromium patches, for their unbundling and GCC work.
 ;; *) Prunes all third_party directories that are not explicitly preserved.
 ;; *) Adjusts "GN" build files such that system libraries are preferred.
 (define ungoogled-chromium-source
-  (let ((chromium-source
-         (origin
-           (method url-fetch)
-           (uri (string-append "https://commondatastorage.googleapis.com"
-                               "/chromium-browser-official/chromium-"
-                               %chromium-version ".tar.xz"))
-           (sha256
-            (base32
-             "1d0c3asfhqh6wlzngajcl0v2wn573m1jd1zqci9bcm3z048043q7"))))
-        (ungoogled-source
-         (origin
-           (method git-fetch)
-           (uri (git-reference (url "https://github.com/Eloston/ungoogled-chromium")
-                               (commit %ungoogled-revision)))
-           (file-name (git-file-name "ungoogled-chromium"
-                                     (string-take %ungoogled-revision 7)))
-           (sha256
-            (base32
-             "04schaaqhnkrgh0p1p0wyjd5aybpxmj3kfnyipwy5nh7d39afymc"))))
-        (debian-source
-         (origin
-           (method git-fetch)
-           (uri (git-reference
-                 (url "https://salsa.debian.org/chromium-team/chromium.git")
-                 (commit %debian-revision)))
-           (file-name (git-file-name "debian-chromium-packaging"
-                                     (if (string-prefix? "debian/" %debian-revision)
-                                         (cadr (string-split %debian-revision #\/))
-                                         (string-take %debian-revision 7))))
-           (sha256
-            (base32
-             "1bn0c86sxkkxgdz0i88y0zh4zr39l6379r2rhgk3b3qbvwz25s3j")))))
-
+  (let ((chromium-source %chromium-origin)
+        (ungoogled-source %ungoogled-origin)
+        (debian-source %debian-origin))
     (origin
       (method computed-origin-method)
       (file-name (string-append "ungoogled-chromium-" %package-version ".tar.xz"))
@@ -335,7 +343,6 @@ from forcing GEXP-PROMISE."
                                (when (and (> (string-length line) 1)
                                           ;; Skip the Debian-specific ones.
                                           (not (string-prefix? "debianization/" line))
-                                          (not (string-prefix? "gcc6/" line))
                                           ;; And those that conflict with Ungoogled.
                                           (not (any (cute string-suffix? <> line)
                                                     '("widevine-buildflag.patch"
@@ -397,6 +404,9 @@ from forcing GEXP-PROMISE."
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f
+       ;; Chromiums build processes may consume up to 8GiB of memory per core.
+       ;; Disable parallel builds to avoid thrashing end user systems.
+       #:parallel-build? #f
        ;; FIXME: Chromiums RUNPATH lacks entries for some libraries, so
        ;; we have to disable validation and add a wrapper below.
        #:validate-runpath? #f
@@ -434,6 +444,7 @@ from forcing GEXP-PROMISE."
              "enable_reporting=false"
              "enable_service_discovery=false"
              "enable_swiftshader=false"
+             "enable_vr=false"
              "enable_widevine=false"
              ;; Disable type-checking for the Web UI to avoid a Java dependency.
              "closure_compile=false"
@@ -597,9 +608,11 @@ from forcing GEXP-PROMISE."
                (format #t "Dumping configure flags...\n")
                (invoke "gn" "args" "out/Release" "--list"))))
          (replace 'build
-           (lambda* (#:key outputs #:allow-other-keys)
+           (lambda* (#:key (parallel-build? #t) #:allow-other-keys)
              (invoke "ninja" "-C" "out/Release"
-                     "-j" (number->string (parallel-job-count))
+                     "-j" (if parallel-build?
+                              (number->string (parallel-job-count))
+                              "1")
                      "chrome"
                      "chromedriver")))
          (replace 'install
@@ -643,12 +656,6 @@ from forcing GEXP-PROMISE."
                            (scandir "." (cut regexp-exec install-regexp <>)))
                  (copy-file "chrome" (string-append lib "/chromium"))
 
-                 ;; TODO: Install icons from "../../chrome/app/themes" into
-                 ;; "out/share/icons/hicolor/$size".
-                 (install-file
-                  "product_logo_48.png"
-                  (string-append out "/share/icons/48x48/chromium.png"))
-
                  (copy-recursively "locales" locales)
                  (copy-recursively "resources" resources)
 
@@ -662,8 +669,18 @@ from forcing GEXP-PROMISE."
                      (,(string-append lib ":" nss "/lib/nss:" mesa "/lib:"
                                       udev "/lib")))
                    ;; Avoid file manager crash.  See <https://bugs.gnu.org/26593>.
-                   `("XDG_DATA_DIRS" ":" prefix (,(string-append gtk+ "/share"))))
-                 #t)))))))
+                   `("XDG_DATA_DIRS" ":" prefix (,(string-append gtk+ "/share")))))
+
+               (with-directory-excursion "chrome/app/theme/chromium"
+                 (for-each
+                  (lambda (size)
+                    (let ((icons (string-append out "/share/icons/hicolor/"
+                                                size "x" size "/apps")))
+                      (mkdir-p icons)
+                      (copy-file (string-append "product_logo_" size ".png")
+                                 (string-append icons "/chromium.png"))))
+                  '("22" "24" "48" "64" "128" "256")))
+               #t))))))
     (native-inputs
      `(("bison" ,bison)
        ("gcc" ,gcc-8)