gnu: chromium: Move origins into separate variables.
* gnu/packages/chromium.scm (%chromium-origin, %ungoogled-origin, %debian-origin): New variables. (ungoogled-chromium-source): Adjust accordingly.
This commit is contained in:
		
							parent
							
								
									6054c823ae
								
							
						
					
					
						commit
						d0804ea0c6
					
				
					 1 changed files with 38 additions and 34 deletions
				
			
		| 
						 | 
					@ -227,50 +227,54 @@ from forcing GEXP-PROMISE."
 | 
				
			||||||
(define %ungoogled-revision "d2beaeff47a6e97b8909163147ad6b4058238f36")
 | 
					(define %ungoogled-revision "d2beaeff47a6e97b8909163147ad6b4058238f36")
 | 
				
			||||||
(define %debian-revision "debian/74.0.3729.108-1")
 | 
					(define %debian-revision "debian/74.0.3729.108-1")
 | 
				
			||||||
(define package-revision "0")
 | 
					(define package-revision "0")
 | 
				
			||||||
 | 
					 | 
				
			||||||
(define %package-version (string-append %chromium-version "-"
 | 
					(define %package-version (string-append %chromium-version "-"
 | 
				
			||||||
                                        package-revision "."
 | 
					                                        package-revision "."
 | 
				
			||||||
                                        (string-take %ungoogled-revision 7)))
 | 
					                                        (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:
 | 
					;; This is a "computed" origin that does the following:
 | 
				
			||||||
;; *) Runs the Ungoogled scripts on a pristine Chromium tarball.
 | 
					;; *) Runs the Ungoogled scripts on a pristine Chromium tarball.
 | 
				
			||||||
;; *) Applies Debians Chromium patches, for their unbundling and GCC work.
 | 
					;; *) Applies Debians Chromium patches, for their unbundling and GCC work.
 | 
				
			||||||
;; *) Prunes all third_party directories that are not explicitly preserved.
 | 
					;; *) Prunes all third_party directories that are not explicitly preserved.
 | 
				
			||||||
;; *) Adjusts "GN" build files such that system libraries are preferred.
 | 
					;; *) Adjusts "GN" build files such that system libraries are preferred.
 | 
				
			||||||
(define ungoogled-chromium-source
 | 
					(define ungoogled-chromium-source
 | 
				
			||||||
  (let ((chromium-source
 | 
					  (let ((chromium-source %chromium-origin)
 | 
				
			||||||
         (origin
 | 
					        (ungoogled-source %ungoogled-origin)
 | 
				
			||||||
           (method url-fetch)
 | 
					        (debian-source %debian-origin))
 | 
				
			||||||
           (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")))))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    (origin
 | 
					    (origin
 | 
				
			||||||
      (method computed-origin-method)
 | 
					      (method computed-origin-method)
 | 
				
			||||||
      (file-name (string-append "ungoogled-chromium-" %package-version ".tar.xz"))
 | 
					      (file-name (string-append "ungoogled-chromium-" %package-version ".tar.xz"))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue