summary refs log tree commit diff
path: root/gnu/packages/chromium.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-06-11 10:09:24 +0200
committerMarius Bakke <mbakke@fastmail.com>2019-06-12 13:29:35 +0200
commitd0804ea0c6f8c9dc96018f315bf2b47b9087a319 (patch)
tree500b3f34819c91cc32224c60214314d2408a6834 /gnu/packages/chromium.scm
parent6054c823ae6fc9ab3e944eff87612cd3d99de07c (diff)
downloadguix-d0804ea0c6f8c9dc96018f315bf2b47b9087a319.tar.gz
gnu: chromium: Move origins into separate variables.
* gnu/packages/chromium.scm (%chromium-origin, %ungoogled-origin,
%debian-origin): New variables.
(ungoogled-chromium-source): Adjust accordingly.
Diffstat (limited to 'gnu/packages/chromium.scm')
-rw-r--r--gnu/packages/chromium.scm72
1 files changed, 38 insertions, 34 deletions
diff --git a/gnu/packages/chromium.scm b/gnu/packages/chromium.scm
index 005b21ad7b..7225e1b0d2 100644
--- a/gnu/packages/chromium.scm
+++ b/gnu/packages/chromium.scm
@@ -227,50 +227,54 @@ from forcing GEXP-PROMISE."
 (define %ungoogled-revision "d2beaeff47a6e97b8909163147ad6b4058238f36")
 (define %debian-revision "debian/74.0.3729.108-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
+      "1d0c3asfhqh6wlzngajcl0v2wn573m1jd1zqci9bcm3z048043q7"))))
+
+(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
+      "04schaaqhnkrgh0p1p0wyjd5aybpxmj3kfnyipwy5nh7d39afymc"))))
+
+(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
+      "1bn0c86sxkkxgdz0i88y0zh4zr39l6379r2rhgk3b3qbvwz25s3j"))))
+
 ;; 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"))