From mboxrd@z Thu Jan 1 00:00:00 1970 From: swedebugia Subject: Re: [bug#28004] [PATCH] gnu: Add ungoogled-chromium. Date: Tue, 05 Feb 2019 06:22:44 +0100 Message-ID: <0D2635DB-4B93-4285-A7C2-4BC699EA4D4D@riseup.net> References: <87y3qvb15k.fsf@fastmail.com> <20190202192023.22087-1-mbakke@fastmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----OLEBV8UXLOH3TYKFR6Q74PQLQ3834I" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([209.51.188.92]:43267) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqtMt-0003KD-T0 for guix-devel@gnu.org; Tue, 05 Feb 2019 00:34:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gqtC7-0004SN-1i for guix-devel@gnu.org; Tue, 05 Feb 2019 00:22:56 -0500 In-Reply-To: <20190202192023.22087-1-mbakke@fastmail.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-patches@gnu.org, Marius Bakke , guix-devel@gnu.org Cc: 28004@debbugs.gnu.org ------OLEBV8UXLOH3TYKFR6Q74PQLQ3834I Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Marius Bakke skrev: (2 februari 2019 20:20:23 CET) >Thanks to Marks beautiful "computed-origin-method", Ungoogled-Chromium >is finally ready for inclusion in Guix=2E > >Features: >* Chromium 72=2E >* No unsolicited network traffic=2E >* Free software only=2E >* No DRM=2E >* Not an April Fools joke=2E > >It's currently using my trivial "fork" of Ungoogled-Chromium[0], which >will be upstreamed once the upstream reorganization[1] is done=2E > >Comments appreciated! > >[0]: >https://github=2Ecom/mbakke/ungoogled-chromium/commit/f9b9074c322a67b04ba= f0982797cd7b7e09614b5 >[1]: https://github=2Ecom/Eloston/ungoogled-chromium/issues/651 > >* gnu/packages/aux-files/chromium/master-preferences=2Ejson, >gnu/packages/chromium=2Escm: New files=2E >* gnu/local=2Emk (GNU_SYSTEM_MODULES): Adjust accordingly=2E >--- > gnu/local=2Emk | 1 + > =2E=2E=2E/chromium/master-preferences=2Ejson | 26 + > gnu/packages/chromium=2Escm | 741 ++++++++++++++++++ > 3 files changed, 768 insertions(+) >create mode 100644 >gnu/packages/aux-files/chromium/master-preferences=2Ejson > create mode 100644 gnu/packages/chromium=2Escm > >diff --git a/gnu/local=2Emk b/gnu/local=2Emk >index 82db1488d6=2E=2Eb5e937cdd7 100644 >--- a/gnu/local=2Emk >+++ b/gnu/local=2Emk >@@ -100,6 +100,7 @@ GNU_SYSTEM_MODULES =3D \ > %D%/packages/check=2Escm \ > %D%/packages/chemistry=2Escm \ > %D%/packages/chez=2Escm \ >+ %D%/packages/chromium=2Escm \ > %D%/packages/ci=2Escm \ > %D%/packages/cinnamon=2Escm \ > %D%/packages/clojure=2Escm \ >diff --git a/gnu/packages/aux-files/chromium/master-preferences=2Ejson >b/gnu/packages/aux-files/chromium/master-preferences=2Ejson >new file mode 100644 >index 0000000000=2E=2E0caa7cc4cd >--- /dev/null >+++ b/gnu/packages/aux-files/chromium/master-preferences=2Ejson >@@ -0,0 +1,26 @@ >+{ >+ "distribution": { >+ "import_bookmarks": false, >+ "make_chrome_default": false, >+ "make_chrome_default_for_user": false, >+ "verbose_logging": true, >+ "skip_first_run_ui": true, >+ "suppress_first_run_default_browser_prompt": true >+ }, >+ "browser": { >+ "has_seen_welcome_page" : true, >+ "check_default_browser" : false >+ }, >+ "dns_prefetching": { >+ "enabled": false >+ }, >+ "alternate_error_pages": { >+ "enabled": false >+ }, >+ "hardware": { >+ "audio_capture_enabled": false >+ }, >+ "default_apps": "noinstall", >+ "hide_web_store_icon": true, >+ "homepage": "https://www=2Egnu=2Eorg/software/guix" >+} >diff --git a/gnu/packages/chromium=2Escm b/gnu/packages/chromium=2Escm >new file mode 100644 >index 0000000000=2E=2Eeb404246d3 >--- /dev/null >+++ b/gnu/packages/chromium=2Escm >@@ -0,0 +1,741 @@ >+;;; GNU Guix --- Functional package management for GNU >+;;; Copyright =C2=A9 2019 Marius Bakke >+;;; >+;;; GNU Guix is free software; you can redistribute it and/or modify >it >+;;; under the terms of the GNU General Public License as published by >+;;; the Free Software Foundation; either version 3 of the License, or >(at >+;;; your option) any later version=2E >+;;; >+;;; GNU Guix is distributed in the hope that it will be useful, but >+;;; WITHOUT ANY WARRANTY; without even the implied warranty of >+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE=2E See the >+;;; GNU General Public License for more details=2E >+;;; >+;;; You should have received a copy of the GNU General Public License >+;;; along with GNU Guix=2E If not, see =2E >+ >+(define-module (gnu packages chromium) >+ #:use-module ((guix licenses) #:prefix license:) >+ #:use-module (guix packages) >+ #:use-module (guix gexp) >+ #:use-module (guix store) >+ #:use-module (guix monads) >+ #:use-module (guix download) >+ #:use-module (guix git-download) >+ #:use-module (guix utils) >+ #:use-module (guix build-system gnu) >+ #:use-module (gnu packages) >+ #:use-module (gnu packages assembly) >+ #:use-module (gnu packages base) >+ #:use-module (gnu packages bison) >+ #:use-module (gnu packages build-tools) >+ #:use-module (gnu packages compression) >+ #:use-module (gnu packages cups) >+ #:use-module (gnu packages curl) >+ #:use-module (gnu packages fontutils) >+ #:use-module (gnu packages gcc) >+ #:use-module (gnu packages ghostscript) >+ #:use-module (gnu packages gl) >+ #:use-module (gnu packages glib) >+ #:use-module (gnu packages gnome) >+ #:use-module (gnu packages gnuzilla) >+ #:use-module (gnu packages gperf) >+ #:use-module (gnu packages gtk) >+ #:use-module (gnu packages icu4c) >+ #:use-module (gnu packages image) >+ #:use-module (gnu packages libevent) >+ #:use-module (gnu packages libffi) >+ #:use-module (gnu packages linux) >+ #:use-module (gnu packages kerberos) >+ #:use-module (gnu packages ninja) >+ #:use-module (gnu packages node) >+ #:use-module (gnu packages pciutils) >+ #:use-module (gnu packages pkg-config) >+ #:use-module (gnu packages pulseaudio) >+ #:use-module (gnu packages python) >+ #:use-module (gnu packages python-web) >+ #:use-module (gnu packages python-xyz) >+ #:use-module (gnu packages regex) >+ #:use-module (gnu packages serialization) >+ #:use-module (gnu packages speech) >+ #:use-module (gnu packages tls) >+ #:use-module (gnu packages valgrind) >+ #:use-module (gnu packages vulkan) >+ #:use-module (gnu packages video) >+ #:use-module (gnu packages xiph) >+ #:use-module (gnu packages xml) >+ #:use-module (gnu packages xdisorg) >+ #:use-module (gnu packages xorg)) >+ >+(define %preserved-third-party-files >+ '("base/third_party/dmg_fp" ;X11-style >+ "base/third_party/dynamic_annotations" ;BSD-2 >+ "base/third_party/icu" ;Unicode, X11-style >+ "base/third_party/superfasthash" ;BSD-3 >+ "base/third_party/symbolize" ;BSD-3 >+ "base/third_party/xdg_mime" ;LGPL2=2E1+ or Academic 2=2E0 >+ "base/third_party/xdg_user_dirs" ;Expat >+ "chrome/third_party/mozilla_security_manager" >;MPL-1=2E1/GPL2+/LGPL2=2E1+ >+ "courgette/third_party/bsdiff" ;BSD-2, BSD protection license >+ "courgette/third_party/divsufsort" ;Expat >+ "net/third_party/http2" ;BSD-3 >+ "net/third_party/mozilla_security_manager" ;MPL-1=2E1/GPL2+/LGPL2=2E= 1+ >+ "net/third_party/nss" ;MPL-2=2E0 >+ "net/third_party/quic" ;BSD-3 >+ "net/third_party/spdy" ;BSD-3 >+ "net/third_party/uri_template" ;ASL2=2E0 >+ "third_party/abseil-cpp" ;ASL2=2E0 >+ "third_party/adobe/flash/flapper_version=2Eh" ;no license, trivial >+ "third_party/angle" ;BSD-3 >+ "third_party/angle/src/common/third_party/base" ;BSD-3 >+ "third_party/angle/src/common/third_party/smhasher" ;Public domain >+ "third_party/angle/src/common/third_party/xxhash" ;BSD-2 >+ "third_party/angle/src/third_party/compiler" ;BSD-2 >+ "third_party/angle/src/third_party/libXNVCtrl" ;Expat >+ "third_party/angle/src/third_party/trace_event" ;BSD-3 >+ "third_party/angle/third_party/glslang" ;BSD-3 >+ "third_party/angle/third_party/spirv-headers" ;Expat >+ "third_party/angle/third_party/spirv-tools" ;Expat >+ "third_party/angle/third_party/vulkan-headers" ;ASL2=2E0 >+ "third_party/angle/third_party/vulkan-loader" ;ASL2=2E0 >+ "third_party/angle/third_party/vulkan-tools" ;ASL2=2E0 >+ "third_party/angle/third_party/vulkan-validation-layers" ;ASL2=2E0 >+ "third_party/apple_apsl" ;APSL2=2E0 >+ "third_party/blink" ;BSD-3 >+ "third_party/boringssl" ;OpenSSL/ISC (Google additions are ISC) >+ "third_party/boringssl/src/third_party/fiat" ;Expat >+ "third_party/breakpad" ;BSD-3 >+ "third_party/brotli" ;Expat >+ "third_party/cacheinvalidation" ;ASL2=2E0 >+ "third_party/catapult" ;BSD-3 >+ "third_party/catapult/common/py_vulcanize/third_party/rcssmin" >;ASL2=2E0 >+ "third_party/catapult/common/py_vulcanize/third_party/rjsmin" >;ASL2=2E0 >+ "third_party/catapult/third_party/polymer" ;BSD-3 >+ "third_party/catapult/tracing/third_party/d3" ;BSD-3 >+ "third_party/catapult/tracing/third_party/gl-matrix" ;Expat >+ "third_party/catapult/tracing/third_party/jszip" ;Expat or GPL3 >+ "third_party/catapult/tracing/third_party/mannwhitneyu" ;Expat >+ "third_party/catapult/tracing/third_party/oboe" ;BSD-2 >+ "third_party/catapult/tracing/third_party/pako" ;Expat >+ "third_party/ced" ;BSD-3 >+ "third_party/cld_3" ;ASL2=2E0 >+ "third_party/closure_compiler" ;ASL2=2E0 >+ "third_party/crashpad" ;ASL2=2E0 >+ "third_party/crashpad/crashpad/third_party/zlib/zlib_crashpad=2Eh" >;Zlib >+ "third_party/crc32c" ;BSD-3 >+ "third_party/cros_system_api" ;BSD-3 >+ "third_party/dom_distiller_js" ;BSD-3 >+ "third_party/fips181" ;BSD-3 >+ "third_party/flatbuffers" ;ASL2=2E0 >+ "third_party/google_input_tools" ;ASL2=2E0 >+ "third_party/google_input_tools/third_party/closure_library" >;ASL2=2E0 >+ =20 >"third_party/google_input_tools/third_party/closure_library/third_party/c= losure" >;Expat >+ "third_party/googletest" ;BSD-3 >+ "third_party/hunspell" ;MPL1=2E1/GPL2+/LGPL2=2E1+ >+ "third_party/iccjpeg" ;IJG >+ "third_party/inspector_protocol" ;BSD-3 >+ "third_party/jinja2" ;BSD-3 >+ "third_party/jstemplate" ;ASL2=2E0 >+ "third_party/khronos" ;Expat, SGI >+ "third_party/leveldatabase" ;BSD-3 >+ "third_party/libXNVCtrl" ;Expat >+ "third_party/libaddressinput" ;ASL2=2E0 >+ "third_party/libaom" ;BSD-2 or "Alliance for Open Media Patent >License 1=2E0" >+ "third_party/libaom/source/libaom/third_party/vector" ;Expat >+ "third_party/libaom/source/libaom/third_party/x86inc" ;ISC >+ "third_party/libjingle_xmpp" ;BSD-3 >+ "third_party/libphonenumber" ;ASL2=2E0 >+ "third_party/libsecret" ;LGPL2=2E1+ >+ "third_party/libsrtp" ;BSD-3 >+ "third_party/libsync" ;ASL2=2E0 >+ "third_party/libudev" ;LGPL2=2E1+ >+ "third_party/libwebm" ;BSD-3 >+ "third_party/libxml/chromium" ;BSD-3 >+ "third_party/libyuv" ;BSD-3 >+ "third_party/lss" ;BSD-3 >+ "third_party/markupsafe" ;BSD-3 >+ "third_party/mesa_headers" ;Expat, SGI >+ "third_party/metrics_proto" ;BSD-3 >+ "third_party/modp_b64" ;BSD-3 >+ "third_party/nasm" ;BSD-2 >+ "third_party/node" ;Expat >+ =20 >"third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2" >;BSD-2 >+ "third_party/ots" ;BSD-3 >+ "third_party/pdfium" ;BSD-3 >+ "third_party/pdfium/third_party/agg23" ;Expat >+ "third_party/pdfium/third_party/base" ;BSD-3 >+ "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=2Eh" >;FreeType >+ "third_party/ply" ;BSD-3 >+ "third_party/polymer" ;BSD-3 >+ "third_party/protobuf" ;BSD-3 >+ "third_party/protobuf/third_party/six" ;Expat >+ "third_party/pyjson5" ;ASL2=2E0 >+ "third_party/qcms" ;Expat >+ "third_party/rnnoise" ;BSD-3 >+ "third_party/s2cellid" ;ASL2=2E0 >+ "third_party/sfntly" ;ASL2=2E0 >+ "third_party/skia" ;BSD-3 >+ "third_party/skia/third_party/gif" ;MPL1=2E1/GPL2+/LGPL2=2E1+ >+ "third_party/skia/third_party/skcms" ;BSD-3 >+ "third_party/skia/third_party/vulkan" ;BSD-3 >+ "third_party/smhasher" ;Expat, public domain >+ "third_party/speech-dispatcher" ;GPL2+ >+ "third_party/spirv-headers" ;ASL2=2E0 >+ "third_party/SPIRV-Tools" ;ASL2=2E0 >+ "third_party/sqlite" ;Public domain >+ "third_party/ungoogled" ;BSD-3 >+ "third_party/usb_ids" ;BSD-3 >+ "third_party/usrsctp" ;BSD-2 >+ "third_party/web-animations-js" ;ASL2=2E0 >+ "third_party/webdriver" ;ASL2=2E0 >+ "third_party/webrtc" ;BSD-3 >+ "third_party/webrtc/common_audio/third_party/fft4g" ;Non-copyleft >+ "third_party/webrtc/common_audio/third_party/spl_sqrt_floor" >;Public domain >+ "third_party/webrtc/modules/third_party/fft" ;Non-copyleft >+ "third_party/webrtc/modules/third_party/g711" ;Public domain >+ "third_party/webrtc/modules/third_party/g722" ;Public domain >+ "third_party/webrtc/rtc_base/third_party/base64" ;Non-copyleft >+ "third_party/webrtc/rtc_base/third_party/sigslot" ;Public domain >+ "third_party/widevine/cdm/widevine_cdm_version=2Eh" ;BSD-3 >+ "third_party/widevine/cdm/widevine_cdm_common=2Eh" ;BSD-3 >+ "third_party/woff2" ;ASL2=2E0 >+ "third_party/xdg-utils" ;Expat >+ "third_party/yasm/run_yasm=2Epy" ;BSD-2 or BSD-3 >+ "third_party/zlib/google" ;BSD-3 >+ "url/third_party/mozilla" ;BSD-3, MPL1=2E1/GPL2+/LGPL2=2E1+ >+ "v8/src/third_party/utf8-decoder" ;Expat >+ "v8/src/third_party/valgrind" ;BSD-4 >+ "v8/third_party/inspector_protocol" ;BSD-3 >+ "v8/third_party/v8/builtins")) ;PSFL >+ >+(define* (computed-origin-method gexp-promise hash-algo hash >+ #:optional (name "source") >+ #:key (system (%current-system)) >+ (guile (default-guile))) >+ "Return a derivation that executes the G-expression that results >+from forcing GEXP-PROMISE=2E" >+ (mlet %store-monad ((guile (package->derivation guile system))) >+ (gexp->derivation (or name "computed-origin") >+ (force gexp-promise) >+ #:system system >+ #:guile-for-build guile))) >+ >+(define %chromium-version "72=2E0=2E3626=2E81") >+(define %ungoogled-revision >"f9b9074c322a67b04baf0982797cd7b7e09614b5") >+ >+;; This is a computed origin that does the following: >+;; 1) Runs the Ungoogled scripts on a pristine Chromium tarball=2E >+;; 2) Prunes all third_party folders that are not explicitly >preserved=2E >+;; 3) Adjusts "GN" build files such that system libraries are >preferred=2E >+(define ungoogled-chromium-source >+ (let* ((chromium-source >+ (origin >+ (method url-fetch) >+ (uri (string-append >"https://commondatastorage=2Egoogleapis=2Ecom" >+ "/chromium-browser-official/chromium-" >+ %chromium-version "=2Etar=2Exz")) >+ (sha256 >+ (base32 >+ =20 >"01l0vlvcckpag376mjld7qprv63l0z8li689k0h6v3h0i7irzs6z")))) >+ (ungoogled-source >+ (origin >+ (method git-fetch) >+ (uri (git-reference (url >"https://github=2Ecom/mbakke/ungoogled-chromium") >+ (commit %ungoogled-revision))) >+ (file-name (git-file-name "ungoogled-chromium" >+ (string-take %ungoogled-revision >7))) >+ (sha256 >+ (base32 >+ =20 >"0gmk1n3i7lbm7rw8zl4df171yhvrlimj8ksj096bf2dlfhbd44rb"))))) >+ >+ (origin >+ (method computed-origin-method) >+ (file-name (string-append "ungoogled-chromium-" >%chromium-version "=2Etar=2Exz")) >+ (sha256 #f) >+ (uri >+ (delay >+ (with-imported-modules '((guix build utils)) >+ #~(begin >+ (use-modules (guix build utils)) >+ (let ((chromium-dir (string-append "chromium-" >#$%chromium-version)) >+ (preserved-files (list >#$@%preserved-third-party-files))) >+ >+ (mkdir "/tmp/bin") >+ (set-path-environment-variable >+ "PATH" '("bin") >+ (list "/tmp" >+ #+(canonical-package patch) >+ #+(canonical-package xz) >+ #+(canonical-package tar) >+ #+python-2 >+ #+python)) >+ >+ (copy-recursively #+ungoogled-source >"/tmp/ungoogled") >+ >+ (with-directory-excursion "/tmp/ungoogled" >+ >+ (format #t "Unpacking chromium tarball=2E=2E=2E~%") >+ (force-output) >+ (invoke "tar" "xf" #+chromium-source) >+ >+ (format #t "Ungooglifying=2E=2E=2E~%") >+ (force-output) >+ (invoke "python3" "run_buildkit_cli=2Epy" "prune" >+ "-b" "config_bundles/guix" chromium-dir) >+ (invoke "python3" "run_buildkit_cli=2Epy" "patches" >"apply" >+ "-b" "config_bundles/guix" chromium-dir) >+ (invoke "python3" "run_buildkit_cli=2Epy" "domains" >"apply" >+ "-b" "config_bundles/linux_rooted" >+ "-c" "/tmp/domainscache=2Etar=2Egz" >chromium-dir) >+ >+ (with-directory-excursion chromium-dir >+ (format #t "Pruning third party files=2E=2E=2E~%") >+ (force-output) >+ (apply invoke "python" >+ =20 >"build/linux/unbundle/remove_bundled_libraries=2Epy" >+ "--do-remove" preserved-files) >+ >+ (format #t "Replacing GN files=2E=2E=2E~%") >+ (force-output) >+ (invoke "python3" >"build/linux/unbundle/replace_gn_files=2Epy" >+ "--system-libraries" "ffmpeg" "flac" >"fontconfig" >+ "freetype" "harfbuzz-ng" "icu" "libdrm" >"libevent" >+ "libjpeg" "libpng" "libvpx" "libwebp" >"libxml" >+ "libxslt" "openh264" "opus" "re2" >"snappy" "yasm" >+ "zlib")) >+ >+ (format #t (string-append "Packing new Ungoogled >tarball =2E=2E=2E~%")) >+ (force-output) >+ (invoke "tar" "cvfa" #$output >+ ;; Avoid non-determinism in the archive=2E >+ "--mtime=3D@0" >+ "--owner=3Droot:0" >+ "--group=3Droot:0" >+ "--sort=3Dname" >+ chromium-dir) >+ >+ #t))))))))) >+ >+(define opus+custom >+ (package/inherit opus >+ (name "opus+custom") >+ (arguments >+ (substitute-keyword-arguments (package-arguments opus) >+ ((#:configure-flags flags ''()) >+ ;; Opus Custom is an optional extension of the Opus >+ ;; specification that allows for unsupported frame >+ ;; sizes=2E Chromium requires that this is enabled=2E >+ `(cons "--enable-custom-modes" >+ ,flags)))))) >+ >+(define libvpx/chromium >+ ;; Chromium 66 and later requires an unreleased libvpx, so we take >the >+ ;; commit from "third_party/libvpx/README=2Echromium" in the tarball= =2E >+ (let ((version (package-version libvpx)) >+ (commit "e188b5435de71bcd602c378f1ac0441111f0f915") >+ (revision "0")) >+ (package/inherit libvpx >+ (name "libvpx-chromium") >+ (version (git-version version revision commit)) >+ (source (origin >+ (method git-fetch) >+ (uri (git-reference >+ (url >"https://chromium=2Egooglesource=2Ecom/webm/libvpx") >+ (commit commit))) >+ (file-name (git-file-name name version)) >+ (sha256 >+ (base32 >+ =20 >"0v7lzvgy45zh7zwzmmzkvbcqmhs4xa97z0h97hd3j6myrxcfz1n9"))))))) >+ >+;; Transitional package until HarfBuzz 2=2E2 is available in Guix master >branch=2E >+(define harfbuzz/chromium >+ (package/inherit harfbuzz >+ (version "2=2E2=2E0") >+ (source (origin >+ (inherit (package-source harfbuzz)) >+ (uri (string-append >"https://www=2Efreedesktop=2Eorg/software/harfbuzz" >+ "/release/harfbuzz-" version >"=2Etar=2Ebz2")) >+ (sha256 >+ (base32 >+ =20 >"047q63jr513azf3g1y7f5xn60b4jdjs9zsmrx04sfw5rasyzrk5p")))))) >+ >+(define-public ungoogled-chromium >+ (package >+ (name "ungoogled-chromium") >+ (version %chromium-version) >+ (synopsis "Graphical web browser") >+ (source ungoogled-chromium-source) >+ (build-system gnu-build-system) >+ (arguments >+ `(#:tests? #f >+ ;; FIXME: There is a "gn" option specifically for setting >-rpath, but >+ ;; it overrides the RUNPATH set by the linker=2E >+ #:validate-runpath? #f >+ #:modules ((guix build gnu-build-system) >+ (guix build utils) >+ (ice-9 ftw) >+ (ice-9 regex) >+ (srfi srfi-26)) >+ #:configure-flags >+ ;; See tools/gn/docs/cookbook=2Emd and >+ ;; https://www=2Echromium=2Eorg/developers/gn-build-configuration >+ ;; for usage=2E Run "=2E/gn args =2E --list" in the Release >+ ;; directory for an exhaustive list of supported flags=2E >+ ;; (Note: The 'configure' phase will do that for you=2E) >+ (list "is_debug=3Dfalse" >+ "use_gold=3Dfalse" >+ "use_lld=3Dfalse" >+ "linux_use_bundled_binutils=3Dfalse" >+ "use_custom_libcxx=3Dfalse" >+ "use_sysroot=3Dfalse" >+ "enable_precompiled_headers=3Dfalse" >+ "goma_dir=3D\"\"" >+ "enable_nacl=3Dfalse" >+ "enable_nacl_nonsfi=3Dfalse" >+ "use_allocator=3D\"none\"" ;don't use tcmalloc >+ "use_unofficial_version_number=3Dfalse" >+ >+ ;; Define a custom toolchain that simply looks up CC, AR >and >+ ;; friends from the environment=2E >+ =20 >"custom_toolchain=3D\"//build/toolchain/linux/unbundle:default\"" >+ =20 >"host_toolchain=3D\"//build/toolchain/linux/unbundle:default\"" >+ >+ ;; Don't assume it's clang=2E >+ "is_clang=3Dfalse" >+ >+ ;; Optimize for building everything at once, as opposed >to >+ ;; incrementally for development=2E See "docs/jumbo=2Emd"= =2E >+ "use_jumbo_build=3Dtrue" >+ >+ ;; Disable type-checking for the Web UI to avoid a Java >dependency=2E >+ "closure_compile=3Dfalse" >+ >+ ;; Disable debugging features to save space=2E >+ "blink_symbol_level=3D0" >+ "enable_iterator_debugging=3Dfalse" >+ >+ ;; Some of the unbundled libraries throws deprecation >+ ;; warnings, etc=2E Ignore it=2E >+ "treat_warnings_as_errors=3Dfalse" >+ >+ ;; Don't add any API keys=2E End users can set them in the >+ ;; environment if desired=2E See >+ ;; >=2E >+ "use_official_google_api_keys=3Dfalse" >+ >+ ;; Disable "safe browsing", which pulls in a dependency >on >+ ;; the nonfree "unrar" program (as of m66)=2E >+ "safe_browsing_mode=3D0" >+ >+ ;; Disable "field trials"=2E >+ "fieldtrial_testing_like_official_build=3Dtrue" >+ >+ ;; Ungoogled components=2E >+ "enable_mdns=3Dfalse" >+ "enable_one_click_signin=3Dfalse" >+ "enable_reading_list=3Dfalse" >+ "enable_remoting=3Dfalse" >+ "enable_reporting=3Dfalse" >+ "enable_service_discovery=3Dfalse" >+ "enable_swiftshader=3Dfalse" >+ "use_vaapi=3Dtrue" >+ >+ ;; Use system libraries where possible=2E >+ "use_system_freetype=3Dtrue" >+ "use_system_harfbuzz=3Dtrue" >+ "use_system_lcms2=3Dtrue" >+ "use_system_libdrm=3Dtrue" >+ "use_system_libjpeg=3Dtrue" >+ "use_system_libpng=3Dtrue" >+ ;;"use_system_libsync=3Dtrue" >+ "use_system_zlib=3Dtrue" >+ >+ "use_gnome_keyring=3Dfalse" ;deprecated by libsecret >+ "use_openh264=3Dtrue" >+ "use_pulseaudio=3Dtrue" >+ "link_pulseaudio=3Dtrue" >+ >+ ;; Don't arbitrarily restrict formats supported by system >ffmpeg=2E >+ "proprietary_codecs=3Dtrue" >+ "ffmpeg_branding=3D\"Chrome\"" >+ >+ ;; WebRTC stuff=2E >+ "rtc_use_h264=3Dtrue" >+ ;; Don't use bundled sources=2E >+ "rtc_build_json=3Dfalse" >+ "rtc_build_libevent=3Dfalse" >+ "rtc_build_libvpx=3Dfalse" >+ "rtc_build_opus=3Dfalse" >+ "rtc_build_ssl=3Dfalse" >+ >+ "rtc_build_libsrtp=3Dtrue" ;FIXME: fails to find headers >+ "rtc_build_usrsctp=3Dtrue" ;TODO: package this >+ (string-append "rtc_jsoncpp_root=3D\"" >+ (assoc-ref %build-inputs "jsoncpp") >+ "/include/jsoncpp/json\"") >+ (string-append "rtc_ssl_root=3D\"" >+ (assoc-ref %build-inputs "openssl") >+ "/include/openssl\"")) >+ #:phases >+ (modify-phases %standard-phases >+ (add-after 'unpack 'patch-stuff >+ (lambda* (#:key inputs #:allow-other-keys) >+ (substitute* "printing/cups_config_helper=2Epy" >+ (("cups_config =3D=2E*") >+ (string-append "cups_config =3D '" (assoc-ref inputs >"cups") >+ "/bin/cups-config'\n"))) >+ >+ (substitute* >+ '("base/process/launch_posix=2Ecc" >+ =20 >"base/third_party/dynamic_annotations/dynamic_annotations=2Ec" >+ "sandbox/linux/seccomp-bpf/sandbox_bpf=2Ecc" >+ "sandbox/linux/services/credentials=2Ecc" >+ "sandbox/linux/services/namespace_utils=2Ecc" >+ "sandbox/linux/services/syscall_wrappers=2Ecc" >+ "sandbox/linux/syscall_broker/broker_host=2Ecc") >+ (("include \"base/third_party/valgrind/") "include >\"valgrind/")) >+ >+ (for-each (lambda (file) >+ (substitute* file >+ ;; Fix opus include path=2E >+ ;; Do not substitute opus_private=2Eh=2E >+ (("#include \"opus\\=2Eh\"") >+ "#include \"opus/opus=2Eh\"") >+ (("#include \"opus_custom\\=2Eh\"") >+ "#include \"opus/opus_custom=2Eh\"") >+ (("#include \"opus_defines\\=2Eh\"") >+ "#include \"opus/opus_defines=2Eh\"") >+ (("#include \"opus_multistream\\=2Eh\"") >+ "#include \"opus/opus_multistream=2Eh\"") >+ (("#include \"opus_types\\=2Eh\"") >+ "#include \"opus/opus_types=2Eh\""))) >+ (find-files (string-append >"third_party/webrtc/modules" >+ =20 >"/audio_coding/codecs/opus"))) >+ >+ (substitute* "chrome/common/chrome_paths=2Ecc" >+ (("/usr/share/chromium/extensions") >+ ;; TODO: Add ~/=2Eguix-profile=2E >+ =20 >"/run/current-system/profile/share/chromium/extensions")) >+ >+ ;; XXX: Should be unnecessary when use_system_lcms2=3Dtrue= =2E >+ (substitute* >"third_party/pdfium/core/fxcodec/codec/ccodec_iccmodule=2Eh" >+ (("include \"third_party/lcms/include/lcms2\\=2Eh\"") >+ "include \"lcms2=2Eh\"")) >+ >+ (substitute* >+ =20 >"third_party/breakpad/breakpad/src/common/linux/libcurl_wrapper=2Eh" >+ (("include \"third_party/curl") "include \"curl")) >+ >+ (substitute* "third_party/webrtc/rtc_base/strings/json=2Eh" >+ (("#include \"third_party/jsoncpp/") "#include >\"json/")) >+ >+ (substitute* "media/base/decode_capabilities=2Ecc" >+ (("third_party/libvpx/source/libvpx/") "")) >+ >+ (substitute* "ui/gfx/skia_util=2Eh" >+ (("third_party/vulkan/include/") "")) >+ >+ ;; Building chromedriver embeds some files using the ZIP >+ ;; format which doesn't support timestamps before >+ ;; 1980=2E Therefore, advance the timestamps of the files >+ ;; which are included so that building chromedriver >+ ;; works=2E >+ (let ((circa-1980 (* 10 366 24 60 60))) >+ (for-each (lambda (file) >+ (utime file circa-1980 circa-1980)) >+ =20 >'("chrome/test/chromedriver/extension/background=2Ejs" >+ =20 >"chrome/test/chromedriver/extension/manifest=2Ejson"))) >+ >+ #t)) >+ (add-before 'configure 'prepare-build-environment >+ (lambda* (#:key inputs #:allow-other-keys) >+ >+ ;; Make sure the right build tools are used=2E >+ (setenv "AR" "ar") (setenv "NM" "nm") >+ (setenv "CC" "gcc") (setenv "CXX" "g++") >+ >+ ;; Work around =2E >+ (unsetenv "C_INCLUDE_PATH") >+ (unsetenv "CPLUS_INCLUDE_PATH") >+ >+ ;; TODO: pre-compile instead=2E Avoids a race condition=2E >+ (setenv "PYTHONDONTWRITEBYTECODE" "1") >+ >+ ;; XXX: How portable is this=2E >+ (mkdir-p "third_party/node/linux/node-linux-x64") >+ (symlink (string-append (assoc-ref inputs "node") "/bin") >+ "third_party/node/linux/node-linux-x64/bin") >+ >+ #t)) >+ (replace 'configure >+ (lambda* (#:key configure-flags #:allow-other-keys) >+ (let ((args (string-join configure-flags " "))) >+ ;; Generate ninja build files=2E >+ (invoke "gn" "gen" "out/Release" >+ (string-append "--args=3D" args)) >+ >+ ;; Print the full list of supported arguments as well >as >+ ;; their current status for convenience=2E >+ (format #t "Dumping configure flags=2E=2E=2E\n") >+ (invoke "gn" "args" "out/Release" "--list")))) >+ (replace 'build >+ (lambda* (#:key outputs #:allow-other-keys) >+ (invoke "ninja" "-C" "out/Release" >+ "-j" (number->string (parallel-job-count)) >+ "chrome" >+ "chromedriver"))) >+ (replace 'install >+ (lambda* (#:key inputs outputs #:allow-other-keys) >+ (let* ((out (assoc-ref outputs "out")) >+ (bin (string-append out "/bin")) >+ (exe (string-append bin "/chromium")) >+ (lib (string-append out "/lib")) >+ (man (string-append out >"/share/man/man1")) >+ (applications (string-append out >"/share/applications")) >+ (install-regexp (make-regexp "\\=2E(bin|pak)$")) >+ (locales (string-append lib "/locales")) >+ (resources (string-append lib "/resources")) >+ (preferences (assoc-ref inputs >"master-preferences")) >+ (gtk+ (assoc-ref inputs "gtk+")) >+ (mesa (assoc-ref inputs "mesa")) >+ (nss (assoc-ref inputs "nss")) >+ (udev (assoc-ref inputs "udev")) >+ (sh (which "sh"))) >+ >+ (substitute* '("chrome/app/resources/manpage=2E1=2Ein" >+ =20 >"chrome/installer/linux/common/desktop=2Etemplate") >+ (("@@MENUNAME@@") "Chromium") >+ (("@@PACKAGE@@") "chromium") >+ (("/usr/bin/@@USR_BIN_SYMLINK_NAME@@") exe)) >+ >+ (mkdir-p man) >+ (copy-file "chrome/app/resources/manpage=2E1=2Ein" >+ (string-append man "/chromium=2E1")) >+ >+ (mkdir-p applications) >+ (copy-file >"chrome/installer/linux/common/desktop=2Etemplate" >+ (string-append applications >"/chromium=2Edesktop")) >+ >+ (mkdir-p lib) >+ (copy-file preferences (string-append lib >"/master_preferences")) >+ >+ (with-directory-excursion "out/Release" >+ (for-each (lambda (file) >+ (install-file file lib)) >+ (scandir "=2E" (cut regexp-exec >install-regexp <>))) >+ (copy-file "chrome" (string-append lib "/chromium")) >+ >+ ;; TODO: Install icons from "=2E=2E/=2E=2E/chrome/app/t= hemes" >into >+ ;; "out/share/icons/hicolor/$size"=2E >+ (install-file >+ "product_logo_48=2Epng" >+ (string-append out >"/share/icons/48x48/chromium=2Epng")) >+ >+ (copy-recursively "locales" locales) >+ (copy-recursively "resources" resources) >+ >+ (mkdir-p bin) >+ (symlink "=2E=2E/lib/chromium" exe) >+ (install-file "chromedriver" bin) >+ >+ (wrap-program exe >+ ;; TODO: Get these in RUNPATH=2E >+ `("LD_LIBRARY_PATH" ":" prefix >+ (,(string-append lib ":" nss "/lib/nss:" gtk+ >"/lib:" >+ mesa "/lib:" udev "/lib"))) >+ ;; Avoid file manager crash=2E See >=2E >+ `("XDG_DATA_DIRS" ":" prefix (,(string-append gtk+ >"/share")))) >+ #t))))))) >+ (native-inputs >+ `(("bison" ,bison) >+ ("gcc" ,gcc-8) >+ ("gn" ,gn) >+ ("gperf" ,gperf) >+ ("ninja" ,ninja) >+ ("node" ,node) >+ ("pkg-config" ,pkg-config) >+ ("which" ,which) >+ ("yasm" ,yasm) >+ >+ ;; This file contains defaults for new user profiles=2E >+ ("master-preferences" ,(local-file >"aux-files/chromium/master-preferences=2Ejson")) >+ >+ ("python-beautifulsoup4" ,python2-beautifulsoup4) >+ ("python-html5lib" ,python2-html5lib) >+ ("python" ,python-2))) >+ (inputs >+ `(("alsa-lib" ,alsa-lib) >+ ("atk" ,atk) >+ ("cups" ,cups) >+ ("curl" ,curl) >+ ("dbus" ,dbus) >+ ("dbus-glib" ,dbus-glib) >+ ("expat" ,expat) >+ ("flac" ,flac) >+ ("ffmpeg" ,ffmpeg) >+ ("fontconfig" ,fontconfig) >+ ("freetype" ,freetype) >+ ("gdk-pixbuf" ,gdk-pixbuf) >+ ("glib" ,glib) >+ ("gtk+" ,gtk+) >+ ("harfbuzz" ,harfbuzz/chromium) >+ ("icu4c" ,icu4c) >+ ("jsoncpp" ,jsoncpp) >+ ("lcms" ,lcms) >+ ("libevent" ,libevent) >+ ("libffi" ,libffi) >+ ("libjpeg-turbo" ,libjpeg-turbo) >+ ("libpng" ,libpng) >+ ("libva" ,libva) >+ ("libvpx" ,libvpx/chromium) >+ ("libwebp" ,libwebp) >+ ("libx11" ,libx11) >+ ("libxcb" ,libxcb) >+ ("libxcomposite" ,libxcomposite) >+ ("libxcursor" ,libxcursor) >+ ("libxdamage" ,libxdamage) >+ ("libxext" ,libxext) >+ ("libxfixes" ,libxfixes) >+ ("libxi" ,libxi) >+ ("libxml2" ,libxml2) >+ ("libxrandr" ,libxrandr) >+ ("libxrender" ,libxrender) >+ ("libxscrnsaver" ,libxscrnsaver) >+ ("libxslt" ,libxslt) >+ ("libxtst" ,libxtst) >+ ("mesa" ,mesa) >+ ("minizip" ,minizip) >+ ("mit-krb5" ,mit-krb5) >+ ("nss" ,nss) >+ ("openh264" ,openh264) >+ ("openjpeg" ,openjpeg) ;PDFium only >+ ("openssl" ,openssl) >+ ("opus" ,opus+custom) >+ ("pango" ,pango) >+ ("pciutils" ,pciutils) >+ ("pulseaudio" ,pulseaudio) >+ ("re2" ,re2) >+ ("snappy" ,snappy) >+ ("speech-dispatcher" ,speech-dispatcher) >+ ("udev" ,eudev) >+ ("valgrind" ,valgrind) >+ ("vulkan-headers" ,vulkan-headers))) >+ (home-page "https://www=2Echromium=2Eorg/") >+ (description >+ "Ungoogled-Chromium is the Chromium web browser, sans integration >with >+Google web services=2E") >+ ;; Chromium is developed as BSD-3, but bundles a large number of >third-party >+ ;; components with other licenses=2E For full information, see >chrome://credits=2E >+ (license (list license:bsd-3 >+ license:bsd-2 >+ license:expat >+ license:asl2=2E0 >+ license:mpl1=2E1 >+ license:mpl2=2E0 >+ license:public-domain >+ license:isc >+ (license:non-copyleft "chrome://credits" >+ "See chrome://credits for >more information=2E") >+ license:lgpl2=2E1+)))) >--=20 >2=2E20=2E1 Wow=2E=20 Nice work! =F0=9F=98=83 --=20 Sent from my k-9 mail for Android=2E ------OLEBV8UXLOH3TYKFR6Q74PQLQ3834I Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Marius Bakke <mbakke= @fastmail=2Ecom> skrev: (2 februari 2019 20:20:23 CET)
Thanks to Marks beautiful "computed-origin-method", =
Ungoogled-Chromium
is finally ready for inclusion in Guix=2E

Feat= ures:
* Chromium 72=2E
* No unsolicited network traffic=2E
* Free = software only=2E
* No DRM=2E
* Not an April Fools joke=2E

It's= currently using my trivial "fork" of Ungoogled-Chromium[0], which
will = be upstreamed once the upstream reorganization[1] is done=2E

Comment= s appreciated!

[0]: https://github= =2Ecom/mbakke/ungoogled-chromium/commit/f9b9074c322a67b04baf0982797cd7b7e09= 614b5
[1]: https://github=2Ecom/Eloston/ungoogled-chromium/issues/651

* gnu/packages/aux-files/chromium/master-preferences=2Ejson,
gn= u/packages/chromium=2Escm: New files=2E
* gnu/local=2Emk (GNU_SYSTEM_MOD= ULES): Adjust accordingly=2E
gnu/local=2Emk = | 1 +
=2E=2E=2E/chromium/master-preferences=2Ejson | = 26 +
gnu/packages/chromium=2Escm | 741 ++++++++++++= ++++++
3 files changed, 768 insertions(+)
create mode 100644 gnu/pa= ckages/aux-files/chromium/master-preferences=2Ejson
create mode 100644 = gnu/packages/chromium=2Escm

diff --git a/gnu/local=2Emk b/gnu/local= =2Emk
index 82db1488d6=2E=2Eb5e937cdd7 100644
--- a/gnu/local=2Emk+++ b/gnu/local=2Emk
@@ -100,6 +100,7 @@ GNU_SYSTEM_MODULES =3D \ %D%/packages/check=2Escm \
%D%/packages/chemistry=2Escm \
= %D%/packages/chez=2Escm \
+ %D%/packages/chromium=2Escm \
= %D%/packages/ci=2Escm \
%D%/packages/cinnamon=2Escm \
%D%= /packages/clojure=2Escm \
diff --git a/gnu/packages/aux-files/chromium= /master-preferences=2Ejson b/gnu/packages/aux-files/chromium/master-prefere= nces=2Ejson
new file mode 100644
index 0000000000=2E=2E0caa7cc4cd
= --- /dev/null
+++ b/gnu/packages/aux-files/chromium/master-preferences= =2Ejson
@@ -0,0 +1,26 @@
+{
+ "distribution": {
+ "import_= bookmarks": false,
+ "make_chrome_default": false,
+ "make_ch= rome_default_for_user": false,
+ "verbose_logging": true,
+ "= skip_first_run_ui": true,
+ "suppress_first_run_default_browser_prom= pt": true
+ },
+ "browser": {
+ "has_seen_welcome_page" : tr= ue,
+ "check_default_browser" : false
+ },
+ "dns_prefetchin= g": {
+ "enabled": false
+ },
+ "alternate_error_pages": {+ "enabled": false
+ },
+ "hardware": {
+ "audio_capture_= enabled": false
+ },
+ "default_apps": "noinstall",
+ "hide_web= _store_icon": true,
+ "homepage": "https://www=2Egnu=2Eorg/software/gui= x"
+}
diff --git a/gnu/packages/chromium=2Escm b/gnu/packages/chromiu= m=2Escm
new file mode 100644
index 0000000000=2E=2Eeb404246d3
--- = /dev/null
+++ b/gnu/packages/chromium=2Escm
@@ -0,0 +1,741 @@
+;;;= GNU Guix --- Functional package management for GNU
+;;; Copyright =C2= =A9 2019 Marius Bakke <mbakke@fastmail=2Ecom>
+;;;
+;;; GNU Gui= x is free software; you can redistribute it and/or modify it
+;;; under = the terms of the GNU General Public License as published by
+;;; the Fre= e Software Foundation; either version 3 of the License, or (at
+;;; your= option) any later version=2E
+;;;
+;;; GNU Guix is distributed in th= e hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without ev= en the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICU= LAR PURPOSE=2E See the
+;;; GNU General Public License for more details= =2E
+;;;
+;;; You should have received a copy of the GNU General Publ= ic License
+;;; along with GNU Guix=2E If not, see <
http://www=2Egnu=2Eorg/licenses/>=2E+
+(define-module (gnu packages chromium)
+ #:use-module ((guix lic= enses) #:prefix license:)
+ #:use-module (guix packages)
+ #:use-mo= dule (guix gexp)
+ #:use-module (guix store)
+ #:use-module (guix m= onads)
+ #:use-module (guix download)
+ #:use-module (guix git-down= load)
+ #:use-module (guix utils)
+ #:use-module (guix build-system= gnu)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages as= sembly)
+ #:use-module (gnu packages base)
+ #:use-module (gnu pack= ages bison)
+ #:use-module (gnu packages build-tools)
+ #:use-modul= e (gnu packages compression)
+ #:use-module (gnu packages cups)
+ #= :use-module (gnu packages curl)
+ #:use-module (gnu packages fontutils)=
+ #:use-module (gnu packages gcc)
+ #:use-module (gnu packages gho= stscript)
+ #:use-module (gnu packages gl)
+ #:use-module (gnu pack= ages glib)
+ #:use-module (gnu packages gnome)
+ #:use-module (gnu = packages gnuzilla)
+ #:use-module (gnu packages gperf)
+ #:use-modu= le (gnu packages gtk)
+ #:use-module (gnu packages icu4c)
+ #:use-m= odule (gnu packages image)
+ #:use-module (gnu packages libevent)
+ = #:use-module (gnu packages libffi)
+ #:use-module (gnu packages linux)=
+ #:use-module (gnu packages kerberos)
+ #:use-module (gnu package= s ninja)
+ #:use-module (gnu packages node)
+ #:use-module (gnu pac= kages pciutils)
+ #:use-module (gnu packages pkg-config)
+ #:use-mo= dule (gnu packages pulseaudio)
+ #:use-module (gnu packages python)
= + #:use-module (gnu packages python-web)
+ #:use-module (gnu packages = python-xyz)
+ #:use-module (gnu packages regex)
+ #:use-module (gnu= packages serialization)
+ #:use-module (gnu packages speech)
+ #:u= se-module (gnu packages tls)
+ #:use-module (gnu packages valgrind)
= + #:use-module (gnu packages vulkan)
+ #:use-module (gnu packages vide= o)
+ #:use-module (gnu packages xiph)
+ #:use-module (gnu packages = xml)
+ #:use-module (gnu packages xdisorg)
+ #:use-module (gnu pack= ages xorg))
+
+(define %preserved-third-party-files
+ '("base/thi= rd_party/dmg_fp" ;X11-style
+ "base/third_party/dynamic_annotations" = ;BSD-2
+ "base/third_party/icu" ;Unicode, X11-style
+ "base/thi= rd_party/superfasthash" ;BSD-3
+ "base/third_party/symbolize" ;BSD-3<= br>+ "base/third_party/xdg_mime" ;LGPL2=2E1+ or Academic 2=2E0
+ "= base/third_party/xdg_user_dirs" ;Expat
+ "chrome/third_party/mozilla_= security_manager" ;MPL-1=2E1/GPL2+/LGPL2=2E1+
+ "courgette/third_part= y/bsdiff" ;BSD-2, BSD protection license
+ "courgette/third_party/div= sufsort" ;Expat
+ "net/third_party/http2" ;BSD-3
+ "net/third_p= arty/mozilla_security_manager" ;MPL-1=2E1/GPL2+/LGPL2=2E1+
+ "net/thi= rd_party/nss" ;MPL-2=2E0
+ "net/third_party/quic" ;BSD-3
+ "net= /third_party/spdy" ;BSD-3
+ "net/third_party/uri_template" ;ASL2=2E0<= br>+ "third_party/abseil-cpp" ;ASL2=2E0
+ "third_party/adobe/flash= /flapper_version=2Eh" ;no license, trivial
+ "third_party/angle" ;BSD= -3
+ "third_party/angle/src/common/third_party/base" ;BSD-3
+ "= third_party/angle/src/common/third_party/smhasher" ;Public domain
+ "= third_party/angle/src/common/third_party/xxhash" ;BSD-2
+ "third_part= y/angle/src/third_party/compiler" ;BSD-2
+ "third_party/angle/src/thi= rd_party/libXNVCtrl" ;Expat
+ "third_party/angle/src/third_party/trac= e_event" ;BSD-3
+ "third_party/angle/third_party/glslang" ;BSD-3
+= "third_party/angle/third_party/spirv-headers" ;Expat
+ "third_par= ty/angle/third_party/spirv-tools" ;Expat
+ "third_party/angle/third_p= arty/vulkan-headers" ;ASL2=2E0
+ "third_party/angle/third_party/vulka= n-loader" ;ASL2=2E0
+ "third_party/angle/third_party/vulkan-tools" ;A= SL2=2E0
+ "third_party/angle/third_party/vulkan-validation-layers" ;A= SL2=2E0
+ "third_party/apple_apsl" ;APSL2=2E0
+ "third_party/bl= ink" ;BSD-3
+ "third_party/boringssl" ;OpenSSL/ISC (Google additions = are ISC)
+ "third_party/boringssl/src/third_party/fiat" ;Expat
+ = "third_party/breakpad" ;BSD-3
+ "third_party/brotli" ;Expat
+ = "third_party/cacheinvalidation" ;ASL2=2E0
+ "third_party/catapult" ;= BSD-3
+ "third_party/catapult/common/py_vulcanize/third_party/rcssmin= " ;ASL2=2E0
+ "third_party/catapult/common/py_vulcanize/third_party/r= jsmin" ;ASL2=2E0
+ "third_party/catapult/third_party/polymer" ;BSD-3<= br>+ "third_party/catapult/tracing/third_party/d3" ;BSD-3
+ "third= _party/catapult/tracing/third_party/gl-matrix" ;Expat
+ "third_party/= catapult/tracing/third_party/jszip" ;Expat or GPL3
+ "third_party/cat= apult/tracing/third_party/mannwhitneyu" ;Expat
+ "third_party/catapul= t/tracing/third_party/oboe" ;BSD-2
+ "third_party/catapult/tracing/th= ird_party/pako" ;Expat
+ "third_party/ced" ;BSD-3
+ "third_part= y/cld_3" ;ASL2=2E0
+ "third_party/closure_compiler" ;ASL2=2E0
+ = "third_party/crashpad" ;ASL2=2E0
+ "third_party/crashpad/crashpad/th= ird_party/zlib/zlib_crashpad=2Eh" ;Zlib
+ "third_party/crc32c" ;BSD-3=
+ "third_party/cros_system_api" ;BSD-3
+ "third_party/dom_dist= iller_js" ;BSD-3
+ "third_party/fips181" ;BSD-3
+ "third_party/= flatbuffers" ;ASL2=2E0
+ "third_party/google_input_tools" ;ASL2=2E0+ "third_party/google_input_tools/third_party/closure_library" ;ASL2= =2E0
+ "third_party/google_input_tools/third_party/closure_library/th= ird_party/closure" ;Expat
+ "third_party/googletest" ;BSD-3
+ "= third_party/hunspell" ;MPL1=2E1/GPL2+/LGPL2=2E1+
+ "third_party/iccjp= eg" ;IJG
+ "third_party/inspector_protocol" ;BSD-3
+ "third_par= ty/jinja2" ;BSD-3
+ "third_party/jstemplate" ;ASL2=2E0
+ "third= _party/khronos" ;Expat, SGI
+ "third_party/leveldatabase" ;BSD-3
+= "third_party/libXNVCtrl" ;Expat
+ "third_party/libaddressinput" ;= ASL2=2E0
+ "third_party/libaom" ;BSD-2 or "Alliance for Open Media Pa= tent License 1=2E0"
+ "third_party/libaom/source/libaom/third_party/v= ector" ;Expat
+ "third_party/libaom/source/libaom/third_party/x86inc"= ;ISC
+ "third_party/libjingle_xmpp" ;BSD-3
+ "third_party/libp= honenumber" ;ASL2=2E0
+ "third_party/libsecret" ;LGPL2=2E1+
+ "= third_party/libsrtp" ;BSD-3
+ "third_party/libsync" ;ASL2=2E0
+ = "third_party/libudev" ;LGPL2=2E1+
+ "third_party/libwebm" ;BSD-3
= + "third_party/libxml/chromium" ;BSD-3
+ "third_party/libyuv" ;BSD= -3
+ "third_party/lss" ;BSD-3
+ "third_party/markupsafe" ;BSD-3=
+ "third_party/mesa_headers" ;Expat, SGI
+ "third_party/metric= s_proto" ;BSD-3
+ "third_party/modp_b64" ;BSD-3
+ "third_party/= nasm" ;BSD-2
+ "third_party/node" ;Expat
+ "third_party/node/no= de_modules/polymer-bundler/lib/third_party/UglifyJS2" ;BSD-2
+ "third= _party/ots" ;BSD-3
+ "third_party/pdfium" ;BSD-3
+ "third_party= /pdfium/third_party/agg23" ;Expat
+ "third_party/pdfium/third_party/b= ase" ;BSD-3
+ "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=2Eh" ;FreeType+ "third_party/ply" ;BSD-3
+ "third_party/polymer" ;BSD-3
+ = "third_party/protobuf" ;BSD-3
+ "third_party/protobuf/third_party/si= x" ;Expat
+ "third_party/pyjson5" ;ASL2=2E0
+ "third_party/qcms= " ;Expat
+ "third_party/rnnoise" ;BSD-3
+ "third_party/s2cellid= " ;ASL2=2E0
+ "third_party/sfntly" ;ASL2=2E0
+ "third_party/ski= a" ;BSD-3
+ "third_party/skia/third_party/gif" ;MPL1=2E1/GPL2+/LGPL2= =2E1+
+ "third_party/skia/third_party/skcms" ;BSD-3
+ "third_pa= rty/skia/third_party/vulkan" ;BSD-3
+ "third_party/smhasher" ;Expat, = public domain
+ "third_party/speech-dispatcher" ;GPL2+
+ "third= _party/spirv-headers" ;ASL2=2E0
+ "third_party/SPIRV-Tools" ;ASL2=2E0=
+ "third_party/sqlite" ;Public domain
+ "third_party/ungoogled= " ;BSD-3
+ "third_party/usb_ids" ;BSD-3
+ "third_party/usrsctp"= ;BSD-2
+ "third_party/web-animations-js" ;ASL2=2E0
+ "third_pa= rty/webdriver" ;ASL2=2E0
+ "third_party/webrtc" ;BSD-3
+ "third= _party/webrtc/common_audio/third_party/fft4g" ;Non-copyleft
+ "third_= party/webrtc/common_audio/third_party/spl_sqrt_floor" ;Public domain
+ = "third_party/webrtc/modules/third_party/fft" ;Non-copyleft
+ "third= _party/webrtc/modules/third_party/g711" ;Public domain
+ "third_party= /webrtc/modules/third_party/g722" ;Public domain
+ "third_party/webrt= c/rtc_base/third_party/base64" ;Non-copyleft
+ "third_party/webrtc/rt= c_base/third_party/sigslot" ;Public domain
+ "third_party/widevine/cd= m/widevine_cdm_version=2Eh" ;BSD-3
+ "third_party/widevine/cdm/widevi= ne_cdm_common=2Eh" ;BSD-3
+ "third_party/woff2" ;ASL2=2E0
+ "th= ird_party/xdg-utils" ;Expat
+ "third_party/yasm/run_yasm=2Epy" ;BSD-2= or BSD-3
+ "third_party/zlib/google" ;BSD-3
+ "url/third_party= /mozilla" ;BSD-3, MPL1=2E1/GPL2+/LGPL2=2E1+
+ "v8/src/third_party/utf= 8-decoder" ;Expat
+ "v8/src/third_party/valgrind" ;BSD-4
+ "v8/= third_party/inspector_protocol" ;BSD-3
+ "v8/third_party/v8/builtins"= )) ;PSFL
+
+(define* (computed-origin-method gexp-promise hash-algo h= ash
+ #:optional (name "source")
+ = #:key (system (%current-system))
+ = (guile (default-guile)))
+ "Return a derivatio= n that executes the G-expression that results
+from forcing GEXP-PROMISE= =2E"
+ (mlet %store-monad ((guile (package->derivation guile system)= ))
+ (gexp->derivation (or name "computed-origin")
+ = (force gexp-promise)
+ #:system system+ #:guile-for-build guile)))
+
+(define %chrom= ium-version "72=2E0=2E3626=2E81")
+(define %ungoogled-revision "f9b9074c= 322a67b04baf0982797cd7b7e09614b5")
+
+;; This is a computed origin th= at does the following:
+;; 1) Runs the Ungoogled scripts on a pristine C= hromium tarball=2E
+;; 2) Prunes all third_party folders that are not ex= plicitly preserved=2E
+;; 3) Adjusts "GN" build files such that system l= ibraries are preferred=2E
+(define ungoogled-chromium-source
+ (let*= ((chromium-source
+ (origin
+ (method url-fetch)=
+ (uri (string-append "https://commondatastorage=2Egoogleapi= s=2Ecom"
+ "/chromium-browser-official/ch= romium-"
+ %chromium-version "=2Etar=2Exz= "))
+ (sha256
+ (base32
+ "01l= 0vlvcckpag376mjld7qprv63l0z8li689k0h6v3h0i7irzs6z"))))
+ (ungoog= led-source
+ (origin
+ (method git-fetch)
+ = (uri (git-reference (url "https://github=2Ecom/mbakke/ungoogled-ch= romium")
+ (commit %ungoogled-revision)))=
+ (file-name (git-file-name "ungoogled-chromium"
+ = (string-take %ungoogled-revision 7)))
+ = (sha256
+ (base32
+ "0gmk1n3i7lbm7= rw8zl4df171yhvrlimj8ksj096bf2dlfhbd44rb")))))
+
+ (origin
+ = (method computed-origin-method)
+ (file-name (string-append "ungo= ogled-chromium-" %chromium-version "=2Etar=2Exz"))
+ (sha256 #f)+ (uri
+ (delay
+ (with-imported-modules '((guix = build utils))
+ #~(begin
+ (use-modules (guix= build utils))
+ (let ((chromium-dir (string-append "ch= romium-" #$%chromium-version))
+ (preserved-files (l= ist #$@%preserved-third-party-files)))
+
+ (mkdir "/t= mp/bin")
+ (set-path-environment-variable
+ = "PATH" '("bin")
+ (list "/tmp"
+ = #+(canonical-package patch)
+ #+(cano= nical-package xz)
+ #+(canonical-package tar)
= + #+python-2
+ #+python))<= br>+
+ (copy-recursively #+ungoogled-source "/tmp/ungoog= led")
+
+ (with-directory-excursion "/tmp/ungoogled"<= br>+
+ (format #t "Unpacking chromium tarball=2E=2E=2E= ~%")
+ (force-output)
+ (invoke "= tar" "xf" #+chromium-source)
+
+ (format #t "Ungoog= lifying=2E=2E=2E~%")
+ (force-output)
+ = (invoke "python3" "run_buildkit_cli=2Epy" "prune"
+ = "-b" "config_bundles/guix" chromium-dir)
+ = (invoke "python3" "run_buildkit_cli=2Epy" "patches" "apply"
+ = "-b" "config_bundles/guix" chromium-dir)
+ = (invoke "python3" "run_buildkit_cli=2Epy" "domains" "apply"
+ = "-b" "config_bundles/linux_rooted"
+ = "-c" "/tmp/domainscache=2Etar=2Egz" chromium-dir)
+
+ = (with-directory-excursion chromium-dir
+ = (format #t "Pruning third party files=2E=2E=2E~%")
+ = (force-output)
+ (apply invoke "python"
+ = "build/linux/unbundle/remove_bundled_libraries= =2Epy"
+ "--do-remove" preserved-files)
+=
+ (format #t "Replacing GN files=2E=2E=2E~%")
+ = (force-output)
+ (invoke "python= 3" "build/linux/unbundle/replace_gn_files=2Epy"
+ = "--system-libraries" "ffmpeg" "flac" "fontconfig"
+ = "freetype" "harfbuzz-ng" "icu" "libdrm" "libevent"
+ = "libjpeg" "libpng" "libvpx" "libwebp" "libxml"
+ = "libxslt" "openh264" "opus" "re2" "snappy" "yas= m"
+ "zlib"))
+
+ (f= ormat #t (string-append "Packing new Ungoogled tarball =2E=2E=2E~%"))
+ = (force-output)
+ (invoke "tar" "cvfa= " #$output
+ ;; Avoid non-determinism in the a= rchive=2E
+ "--mtime=3D@0"
+ = "--owner=3Droot:0"
+ "--group=3Dro= ot:0"
+ "--sort=3Dname"
+ = chromium-dir)
+
+ #t)))))))))
+
+(de= fine opus+custom
+ (package/inherit opus
+ (name "opus+custom")+ (arguments
+ (substitute-keyword-arguments (package-arguments= opus)
+ ((#:configure-flags flags ''())
+ ;; Opus Custo= m is an optional extension of the Opus
+ ;; specification that al= lows for unsupported frame
+ ;; sizes=2E Chromium requires that = this is enabled=2E
+ `(cons "--enable-custom-modes"
+ = ,flags))))))
+
+(define libvpx/chromium
+ ;; Chromium 66 an= d later requires an unreleased libvpx, so we take the
+ ;; commit from = "third_party/libvpx/README=2Echromium" in the tarball=2E
+ (let ((versi= on (package-version libvpx))
+ (commit "e188b5435de71bcd602c378f1= ac0441111f0f915")
+ (revision "0"))
+ (package/inherit libv= px
+ (name "libvpx-chromium")
+ (version (git-version versi= on revision commit))
+ (source (origin
+ (method = git-fetch)
+ (uri (git-reference
+ = (url "https://chromium=2Egooglesource=2Ecom/webm/libvpx")
+ = (commit commit)))
+ (file-name (git-file-name = name version))
+ (sha256
+ (base32
= + "0v7lzvgy45zh7zwzmmzkvbcqmhs4xa97z0h97hd3j6myrxcfz1n9"))= )))))
+
+;; Transitional package until HarfBuzz 2=2E2 is available in= Guix master branch=2E
+(define harfbuzz/chromium
+ (package/inherit= harfbuzz
+ (version "2=2E2=2E0")
+ (source (origin
+ = (inherit (package-source harfbuzz))
+ (uri (string-a= ppend "https://www=2Efreedesktop=2Eorg/software/harfbuzz"
+ = "/release/harfbuzz-" version "=2Etar=2Ebz2"))
+ = (sha256
+ (base32
+ "047q63jr5= 13azf3g1y7f5xn60b4jdjs9zsmrx04sfw5rasyzrk5p"))))))
+
+(define-public = ungoogled-chromium
+ (package
+ (name "ungoogled-chromium")
+ = (version %chromium-version)
+ (synopsis "Graphical web browser")+ (source ungoogled-chromium-source)
+ (build-system gnu-build-s= ystem)
+ (arguments
+ `(#:tests? #f
+ ;; FIXME: There= is a "gn" option specifically for setting -rpath, but
+ ;; it ove= rrides the RUNPATH set by the linker=2E
+ #:validate-runpath? #f+ #:modules ((guix build gnu-build-system)
+ (g= uix build utils)
+ (ice-9 ftw)
+ (i= ce-9 regex)
+ (srfi srfi-26))
+ #:configure-fl= ags
+ ;; See tools/gn/docs/cookbook=2Emd and
+ ;; https:/= /www=2Echromium=2Eorg/developers/gn-build-configuration
+ ;; f= or usage=2E Run "=2E/gn args =2E --list" in the Release
+ ;; dire= ctory for an exhaustive list of supported flags=2E
+ ;; (Note: The= 'configure' phase will do that for you=2E)
+ (list "is_debug=3Dfa= lse"
+ "use_gold=3Dfalse"
+ "use_lld=3Dfalse"=
+ "linux_use_bundled_binutils=3Dfalse"
+ "us= e_custom_libcxx=3Dfalse"
+ "use_sysroot=3Dfalse"
+ = "enable_precompiled_headers=3Dfalse"
+ "goma_dir=3D\"\= ""
+ "enable_nacl=3Dfalse"
+ "enable_nacl_non= sfi=3Dfalse"
+ "use_allocator=3D\"none\"" ;don't use tcmal= loc
+ "use_unofficial_version_number=3Dfalse"
+
+ = ;; Define a custom toolchain that simply looks up CC, AR and
+ = ;; friends from the environment=2E
+ "custom_tool= chain=3D\"//build/toolchain/linux/unbundle:default\""
+ "hos= t_toolchain=3D\"//build/toolchain/linux/unbundle:default\""
+
+ = ;; Don't assume it's clang=2E
+ "is_clang=3Dfalse"+
+ ;; Optimize for building everything at once, as opposed= to
+ ;; incrementally for development=2E See "docs/jumbo= =2Emd"=2E
+ "use_jumbo_build=3Dtrue"
+
+ ;= ; Disable type-checking for the Web UI to avoid a Java dependency=2E
+ = "closure_compile=3Dfalse"
+
+ ;; Disable debug= ging features to save space=2E
+ "blink_symbol_level=3D0"+ "enable_iterator_debugging=3Dfalse"
+
+ ;;= Some of the unbundled libraries throws deprecation
+ ;; war= nings, etc=2E Ignore it=2E
+ "treat_warnings_as_errors=3Dfa= lse"
+
+ ;; Don't add any API keys=2E End users can set = them in the
+ ;; environment if desired=2E See
+ = ;; <https://www=2Echromium=2Eorg/developers/how-tos/api-keys>=2E+ "use_official_google_api_keys=3Dfalse"
+
+ = ;; Disable "safe browsing", which pulls in a dependency on
+ = ;; the nonfree "unrar" program (as of m66)=2E
+ "safe_bro= wsing_mode=3D0"
+
+ ;; Disable "field trials"=2E
+ = "fieldtrial_testing_like_official_build=3Dtrue"
+
+ = ;; Ungoogled components=2E
+ "enable_mdns=3Dfalse"
+ = "enable_one_click_signin=3Dfalse"
+ "enable_read= ing_list=3Dfalse"
+ "enable_remoting=3Dfalse"
+ = "enable_reporting=3Dfalse"
+ "enable_service_discovery=3D= false"
+ "enable_swiftshader=3Dfalse"
+ "use_= vaapi=3Dtrue"
+
+ ;; Use system libraries where possible= =2E
+ "use_system_freetype=3Dtrue"
+ "use_sys= tem_harfbuzz=3Dtrue"
+ "use_system_lcms2=3Dtrue"
+ = "use_system_libdrm=3Dtrue"
+ "use_system_libjpeg=3Dtru= e"
+ "use_system_libpng=3Dtrue"
+ ;;"use_syst= em_libsync=3Dtrue"
+ "use_system_zlib=3Dtrue"
+
+ = "use_gnome_keyring=3Dfalse" ;deprecated by libsecret
+ = "use_openh264=3Dtrue"
+ "use_pulseaudio=3Dtrue"
+ = "link_pulseaudio=3Dtrue"
+
+ ;; Don't arbitraril= y restrict formats supported by system ffmpeg=2E
+ "propriet= ary_codecs=3Dtrue"
+ "ffmpeg_branding=3D\"Chrome\""
+
= + ;; WebRTC stuff=2E
+ "rtc_use_h264=3Dtrue"
= + ;; Don't use bundled sources=2E
+ "rtc_build_j= son=3Dfalse"
+ "rtc_build_libevent=3Dfalse"
+ = "rtc_build_libvpx=3Dfalse"
+ "rtc_build_opus=3Dfalse"
+ = "rtc_build_ssl=3Dfalse"
+
+ "rtc_build_libsrt= p=3Dtrue" ;FIXME: fails to find headers
+ "rtc_build_usrsc= tp=3Dtrue" ;TODO: package this
+ (string-append "rtc_jsonc= pp_root=3D\""
+ (assoc-ref %build-inputs "jso= ncpp")
+ "/include/jsoncpp/json\"")
+ = (string-append "rtc_ssl_root=3D\""
+ = (assoc-ref %build-inputs "openssl")
+ "/inclu= de/openssl\""))
+ #:phases
+ (modify-phases %standard-pha= ses
+ (add-after 'unpack 'patch-stuff
+ (lambda* (#= :key inputs #:allow-other-keys)
+ (substitute* "printing/cup= s_config_helper=2Epy"
+ (("cups_config =3D=2E*")
+ = (string-append "cups_config =3D '" (assoc-ref inputs "cups")
= + "/bin/cups-config'\n")))
+
+ = (substitute*
+ '("base/process/launch_posix=2Ecc"+ "base/third_party/dynamic_annotations/dynamic_annotati= ons=2Ec"
+ "sandbox/linux/seccomp-bpf/sandbox_bpf=2Ecc= "
+ "sandbox/linux/services/credentials=2Ecc"
+ = "sandbox/linux/services/namespace_utils=2Ecc"
+ = "sandbox/linux/services/syscall_wrappers=2Ecc"
+ = "sandbox/linux/syscall_broker/broker_host=2Ecc")
+ (("= include \"base/third_party/valgrind/") "include \"valgrind/"))
+
+ = (for-each (lambda (file)
+ (substitute= * file
+ ;; Fix opus include path=2E
+ = ;; Do not substitute opus_private=2Eh=2E
+ = (("#include \"opus\\=2Eh\"")
+ = "#include \"opus/opus=2Eh\"")
+ (("#inclu= de \"opus_custom\\=2Eh\"")
+ "#include \"opus= /opus_custom=2Eh\"")
+ (("#include \"opus_defi= nes\\=2Eh\"")
+ "#include \"opus/opus_defines= =2Eh\"")
+ (("#include \"opus_multistream\\=2E= h\"")
+ "#include \"opus/opus_multistream=2Eh= \"")
+ (("#include \"opus_types\\=2Eh\"")
+= "#include \"opus/opus_types=2Eh\"")))
+ = (find-files (string-append "third_party/webrtc/modules"+ "/audio_coding/codecs/= opus")))
+
+ (substitute* "chrome/common/chrome_paths=2Ec= c"
+ (("/usr/share/chromium/extensions")
+ = ;; TODO: Add ~/=2Eguix-profile=2E
+ "/run/current-syst= em/profile/share/chromium/extensions"))
+
+ ;; XXX: Shoul= d be unnecessary when use_system_lcms2=3Dtrue=2E
+ (substitu= te* "third_party/pdfium/core/fxcodec/codec/ccodec_iccmodule=2Eh"
+ = (("include \"third_party/lcms/include/lcms2\\=2Eh\"")
+ = "include \"lcms2=2Eh\""))
+
+ (substitute*
+ = "third_party/breakpad/breakpad/src/common/linux/libcurl_wrap= per=2Eh"
+ (("include \"third_party/curl") "include \"curl= "))
+
+ (substitute* "third_party/webrtc/rtc_base/strings= /json=2Eh"
+ (("#include \"third_party/jsoncpp/") "#includ= e \"json/"))
+
+ (substitute* "media/base/decode_capabili= ties=2Ecc"
+ (("third_party/libvpx/source/libvpx/") ""))+
+ (substitute* "ui/gfx/skia_util=2Eh"
+ = (("third_party/vulkan/include/") ""))
+
+ ;; Building ch= romedriver embeds some files using the ZIP
+ ;; format which= doesn't support timestamps before
+ ;; 1980=2E Therefore, a= dvance the timestamps of the files
+ ;; which are included s= o that building chromedriver
+ ;; works=2E
+ = (let ((circa-1980 (* 10 366 24 60 60)))
+ (for-each (lambd= a (file)
+ (utime file circa-1980 circa-1980))=
+ '("chrome/test/chromedriver/extension/backgro= und=2Ejs"
+ "chrome/test/chromedriver/extensio= n/manifest=2Ejson")))
+
+ #t))
+ (add-before '= configure 'prepare-build-environment
+ (lambda* (#:key inputs = #:allow-other-keys)
+
+ ;; Make sure the right build tool= s are used=2E
+ (setenv "AR" "ar") (setenv "NM" "nm")
+ = (setenv "CC" "gcc") (setenv "CXX" "g++")
+
+ ;= ; Work around <https://bugs= =2Egnu=2Eorg/30756>=2E
+ (unsetenv "C_INCLUDE_PATH")<= br>+ (unsetenv "CPLUS_INCLUDE_PATH")
+
+ ;; T= ODO: pre-compile instead=2E Avoids a race condition=2E
+ (se= tenv "PYTHONDONTWRITEBYTECODE" "1")
+
+ ;; XXX: How porta= ble is this=2E
+ (mkdir-p "third_party/node/linux/node-linux= -x64")
+ (symlink (string-append (assoc-ref inputs "node") "= /bin")
+ "third_party/node/linux/node-linux-x64/bin= ")
+
+ #t))
+ (replace 'configure
+ = (lambda* (#:key configure-flags #:allow-other-keys)
+ (le= t ((args (string-join configure-flags " ")))
+ ;; Generate= ninja build files=2E
+ (invoke "gn" "gen" "out/Release"+ (string-append "--args=3D" args))
+
+ = ;; Print the full list of supported arguments as well as
+ = ;; their current status for convenience=2E
+ (fo= rmat #t "Dumping configure flags=2E=2E=2E\n")
+ (invoke "g= n" "args" "out/Release" "--list"))))
+ (replace 'build
+ = (lambda* (#:key outputs #:allow-other-keys)
+ (invoke = "ninja" "-C" "out/Release"
+ "-j" (number->string= (parallel-job-count))
+ "chrome"
+ = "chromedriver")))
+ (replace 'install
+ (lam= bda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out= (assoc-ref outputs "out"))
+ (bin = (string-append out "/bin"))
+ (exe (st= ring-append bin "/chromium"))
+ (lib (stri= ng-append out "/lib"))
+ (man (string-appe= nd out "/share/man/man1"))
+ (applications (string-= append out "/share/applications"))
+ (install-regexp = (make-regexp "\\=2E(bin|pak)$"))
+ (locales (s= tring-append lib "/locales"))
+ (resources (stri= ng-append lib "/resources"))
+ (preferences (assoc= -ref inputs "master-preferences"))
+ (gtk+ = (assoc-ref inputs "gtk+"))
+ (mesa (assoc-r= ef inputs "mesa"))
+ (nss (assoc-ref input= s "nss"))
+ (udev (assoc-ref inputs "udev")= )
+ (sh (which "sh")))
+
+ = (substitute* '("chrome/app/resources/manpage=2E1=2Ein"
+ = "chrome/installer/linux/common/desktop=2Etemplate")
= + (("@@MENUNAME@@") "Chromium")
+ (("@@P= ACKAGE@@") "chromium")
+ (("/usr/bin/@@USR_BIN_SYMLINK_N= AME@@") exe))
+
+ (mkdir-p man)
+ (cop= y-file "chrome/app/resources/manpage=2E1=2Ein"
+ = (string-append man "/chromium=2E1"))
+
+ (mkdir-p app= lications)
+ (copy-file "chrome/installer/linux/common/des= ktop=2Etemplate"
+ (string-append applications = "/chromium=2Edesktop"))
+
+ (mkdir-p lib)
+ = (copy-file preferences (string-append lib "/master_preferences"))
= +
+ (with-directory-excursion "out/Release"
+ = (for-each (lambda (file)
+ (install-f= ile file lib))
+ (scandir "=2E" (cut regexp-ex= ec install-regexp <>)))
+ (copy-file "chrome" (str= ing-append lib "/chromium"))
+
+ ;; TODO: Install ico= ns from "=2E=2E/=2E=2E/chrome/app/themes" into
+ ;; "out= /share/icons/hicolor/$size"=2E
+ (install-file
+ = "product_logo_48=2Epng"
+ (string-append o= ut "/share/icons/48x48/chromium=2Epng"))
+
+ (copy-re= cursively "locales" locales)
+ (copy-recursively "resour= ces" resources)
+
+ (mkdir-p bin)
+ = (symlink "=2E=2E/lib/chromium" exe)
+ (install-file "c= hromedriver" bin)
+
+ (wrap-program exe
+ = ;; TODO: Get these in RUNPATH=2E
+ `("LD_LIB= RARY_PATH" ":" prefix
+ (,(string-append lib ":" nss= "/lib/nss:" gtk+ "/lib:"
+ mesa "/= lib:" udev "/lib")))
+ ;; Avoid file manager crash=2E = See <https://bugs=2Egnu=2Eor= g/26593>=2E
+ `("XDG_DATA_DIRS" ":" prefix (,(s= tring-append gtk+ "/share"))))
+ #t)))))))
+ (nati= ve-inputs
+ `(("bison" ,bison)
+ ("gcc" ,gcc-8)
+ = ("gn" ,gn)
+ ("gperf" ,gperf)
+ ("ninja" ,ninja)
+ = ("node" ,node)
+ ("pkg-config" ,pkg-config)
+ ("which"= ,which)
+ ("yasm" ,yasm)
+
+ ;; This file contains de= faults for new user profiles=2E
+ ("master-preferences" ,(local-fi= le "aux-files/chromium/master-preferences=2Ejson"))
+
+ ("pytho= n-beautifulsoup4" ,python2-beautifulsoup4)
+ ("python-html5lib" ,p= ython2-html5lib)
+ ("python" ,python-2)))
+ (inputs
+ = `(("alsa-lib" ,alsa-lib)
+ ("atk" ,atk)
+ ("cups" ,cups)=
+ ("curl" ,curl)
+ ("dbus" ,dbus)
+ ("dbus-glib= " ,dbus-glib)
+ ("expat" ,expat)
+ ("flac" ,flac)
+ = ("ffmpeg" ,ffmpeg)
+ ("fontconfig" ,fontconfig)
+ ("f= reetype" ,freetype)
+ ("gdk-pixbuf" ,gdk-pixbuf)
+ ("glib= " ,glib)
+ ("gtk+" ,gtk+)
+ ("harfbuzz" ,harfbuzz/chromiu= m)
+ ("icu4c" ,icu4c)
+ ("jsoncpp" ,jsoncpp)
+ (= "lcms" ,lcms)
+ ("libevent" ,libevent)
+ ("libffi" ,libff= i)
+ ("libjpeg-turbo" ,libjpeg-turbo)
+ ("libpng" ,libpng= )
+ ("libva" ,libva)
+ ("libvpx" ,libvpx/chromium)
+ = ("libwebp" ,libwebp)
+ ("libx11" ,libx11)
+ ("libxcb= " ,libxcb)
+ ("libxcomposite" ,libxcomposite)
+ ("libxcur= sor" ,libxcursor)
+ ("libxdamage" ,libxdamage)
+ ("libxex= t" ,libxext)
+ ("libxfixes" ,libxfixes)
+ ("libxi" ,libxi= )
+ ("libxml2" ,libxml2)
+ ("libxrandr" ,libxrandr)
+ = ("libxrender" ,libxrender)
+ ("libxscrnsaver" ,libxscrnsaver= )
+ ("libxslt" ,libxslt)
+ ("libxtst" ,libxtst)
+ = ("mesa" ,mesa)
+ ("minizip" ,minizip)
+ ("mit-krb5" ,mi= t-krb5)
+ ("nss" ,nss)
+ ("openh264" ,openh264)
+ = ("openjpeg" ,openjpeg) ;PDFium only
+ (= "openssl" ,openssl)
+ ("opus" ,opus+custom)
+ ("pango" ,p= ango)
+ ("pciutils" ,pciutils)
+ ("pulseaudio" ,pulseaudi= o)
+ ("re2" ,re2)
+ ("snappy" ,snappy)
+ ("speec= h-dispatcher" ,speech-dispatcher)
+ ("udev" ,eudev)
+ ("v= algrind" ,valgrind)
+ ("vulkan-headers" ,vulkan-headers)))
+ = (home-page "https://www=2Echromium=2Eorg/")
+ (description
+ = "Ungoogled-Chromium is the Chromium web browser, sans integration with
+= Google web services=2E")
+ ;; Chromium is developed as BSD-3, but bun= dles a large number of third-party
+ ;; components with other license= s=2E For full information, see chrome://credits=2E
+ (license (list = license:bsd-3
+ license:bsd-2
+ l= icense:expat
+ license:asl2=2E0
+ = license:mpl1=2E1
+ license:mpl2=2E0
+ = license:public-domain
+ license:isc
+ = (license:non-copyleft "chrome://credits"
+ = "See chrome://credits for more information=2E")
+ = license:lgpl2=2E1+))))

Wow=2E
Nice work! =F0=9F=98=83
--
Sent from my k-9 mail= for Android=2E
------OLEBV8UXLOH3TYKFR6Q74PQLQ3834I-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:43124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqtMp-0003I7-HL for guix-patches@gnu.org; Tue, 05 Feb 2019 00:34:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gqtDG-0006AI-At for guix-patches@gnu.org; Tue, 05 Feb 2019 00:24:07 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60689) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gqtDG-0006A4-6b for guix-patches@gnu.org; Tue, 05 Feb 2019 00:24:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gqtDF-0005sw-Tn for guix-patches@gnu.org; Tue, 05 Feb 2019 00:24:01 -0500 Subject: [bug#28004] [PATCH] gnu: Add ungoogled-chromium. Resent-Message-ID: Date: Tue, 05 Feb 2019 06:22:44 +0100 In-Reply-To: <20190202192023.22087-1-mbakke@fastmail.com> References: <87y3qvb15k.fsf@fastmail.com> <20190202192023.22087-1-mbakke@fastmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----OLEBV8UXLOH3TYKFR6Q74PQLQ3834I" Content-Transfer-Encoding: 7bit From: swedebugia Message-ID: <0D2635DB-4B93-4285-A7C2-4BC699EA4D4D@riseup.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 28004@debbugs.gnu.org, mbakke@fastmail.com, guix-devel@gnu.org ------OLEBV8UXLOH3TYKFR6Q74PQLQ3834I Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Marius Bakke skrev: (2 februari 2019 20:20:23 CET) >Thanks to Marks beautiful "computed-origin-method", Ungoogled-Chromium >is finally ready for inclusion in Guix=2E > >Features: >* Chromium 72=2E >* No unsolicited network traffic=2E >* Free software only=2E >* No DRM=2E >* Not an April Fools joke=2E > >It's currently using my trivial "fork" of Ungoogled-Chromium[0], which >will be upstreamed once the upstream reorganization[1] is done=2E > >Comments appreciated! > >[0]: >https://github=2Ecom/mbakke/ungoogled-chromium/commit/f9b9074c322a67b04ba= f0982797cd7b7e09614b5 >[1]: https://github=2Ecom/Eloston/ungoogled-chromium/issues/651 > >* gnu/packages/aux-files/chromium/master-preferences=2Ejson, >gnu/packages/chromium=2Escm: New files=2E >* gnu/local=2Emk (GNU_SYSTEM_MODULES): Adjust accordingly=2E >--- > gnu/local=2Emk | 1 + > =2E=2E=2E/chromium/master-preferences=2Ejson | 26 + > gnu/packages/chromium=2Escm | 741 ++++++++++++++++++ > 3 files changed, 768 insertions(+) >create mode 100644 >gnu/packages/aux-files/chromium/master-preferences=2Ejson > create mode 100644 gnu/packages/chromium=2Escm > >diff --git a/gnu/local=2Emk b/gnu/local=2Emk >index 82db1488d6=2E=2Eb5e937cdd7 100644 >--- a/gnu/local=2Emk >+++ b/gnu/local=2Emk >@@ -100,6 +100,7 @@ GNU_SYSTEM_MODULES =3D \ > %D%/packages/check=2Escm \ > %D%/packages/chemistry=2Escm \ > %D%/packages/chez=2Escm \ >+ %D%/packages/chromium=2Escm \ > %D%/packages/ci=2Escm \ > %D%/packages/cinnamon=2Escm \ > %D%/packages/clojure=2Escm \ >diff --git a/gnu/packages/aux-files/chromium/master-preferences=2Ejson >b/gnu/packages/aux-files/chromium/master-preferences=2Ejson >new file mode 100644 >index 0000000000=2E=2E0caa7cc4cd >--- /dev/null >+++ b/gnu/packages/aux-files/chromium/master-preferences=2Ejson >@@ -0,0 +1,26 @@ >+{ >+ "distribution": { >+ "import_bookmarks": false, >+ "make_chrome_default": false, >+ "make_chrome_default_for_user": false, >+ "verbose_logging": true, >+ "skip_first_run_ui": true, >+ "suppress_first_run_default_browser_prompt": true >+ }, >+ "browser": { >+ "has_seen_welcome_page" : true, >+ "check_default_browser" : false >+ }, >+ "dns_prefetching": { >+ "enabled": false >+ }, >+ "alternate_error_pages": { >+ "enabled": false >+ }, >+ "hardware": { >+ "audio_capture_enabled": false >+ }, >+ "default_apps": "noinstall", >+ "hide_web_store_icon": true, >+ "homepage": "https://www=2Egnu=2Eorg/software/guix" >+} >diff --git a/gnu/packages/chromium=2Escm b/gnu/packages/chromium=2Escm >new file mode 100644 >index 0000000000=2E=2Eeb404246d3 >--- /dev/null >+++ b/gnu/packages/chromium=2Escm >@@ -0,0 +1,741 @@ >+;;; GNU Guix --- Functional package management for GNU >+;;; Copyright =C2=A9 2019 Marius Bakke >+;;; >+;;; GNU Guix is free software; you can redistribute it and/or modify >it >+;;; under the terms of the GNU General Public License as published by >+;;; the Free Software Foundation; either version 3 of the License, or >(at >+;;; your option) any later version=2E >+;;; >+;;; GNU Guix is distributed in the hope that it will be useful, but >+;;; WITHOUT ANY WARRANTY; without even the implied warranty of >+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE=2E See the >+;;; GNU General Public License for more details=2E >+;;; >+;;; You should have received a copy of the GNU General Public License >+;;; along with GNU Guix=2E If not, see =2E >+ >+(define-module (gnu packages chromium) >+ #:use-module ((guix licenses) #:prefix license:) >+ #:use-module (guix packages) >+ #:use-module (guix gexp) >+ #:use-module (guix store) >+ #:use-module (guix monads) >+ #:use-module (guix download) >+ #:use-module (guix git-download) >+ #:use-module (guix utils) >+ #:use-module (guix build-system gnu) >+ #:use-module (gnu packages) >+ #:use-module (gnu packages assembly) >+ #:use-module (gnu packages base) >+ #:use-module (gnu packages bison) >+ #:use-module (gnu packages build-tools) >+ #:use-module (gnu packages compression) >+ #:use-module (gnu packages cups) >+ #:use-module (gnu packages curl) >+ #:use-module (gnu packages fontutils) >+ #:use-module (gnu packages gcc) >+ #:use-module (gnu packages ghostscript) >+ #:use-module (gnu packages gl) >+ #:use-module (gnu packages glib) >+ #:use-module (gnu packages gnome) >+ #:use-module (gnu packages gnuzilla) >+ #:use-module (gnu packages gperf) >+ #:use-module (gnu packages gtk) >+ #:use-module (gnu packages icu4c) >+ #:use-module (gnu packages image) >+ #:use-module (gnu packages libevent) >+ #:use-module (gnu packages libffi) >+ #:use-module (gnu packages linux) >+ #:use-module (gnu packages kerberos) >+ #:use-module (gnu packages ninja) >+ #:use-module (gnu packages node) >+ #:use-module (gnu packages pciutils) >+ #:use-module (gnu packages pkg-config) >+ #:use-module (gnu packages pulseaudio) >+ #:use-module (gnu packages python) >+ #:use-module (gnu packages python-web) >+ #:use-module (gnu packages python-xyz) >+ #:use-module (gnu packages regex) >+ #:use-module (gnu packages serialization) >+ #:use-module (gnu packages speech) >+ #:use-module (gnu packages tls) >+ #:use-module (gnu packages valgrind) >+ #:use-module (gnu packages vulkan) >+ #:use-module (gnu packages video) >+ #:use-module (gnu packages xiph) >+ #:use-module (gnu packages xml) >+ #:use-module (gnu packages xdisorg) >+ #:use-module (gnu packages xorg)) >+ >+(define %preserved-third-party-files >+ '("base/third_party/dmg_fp" ;X11-style >+ "base/third_party/dynamic_annotations" ;BSD-2 >+ "base/third_party/icu" ;Unicode, X11-style >+ "base/third_party/superfasthash" ;BSD-3 >+ "base/third_party/symbolize" ;BSD-3 >+ "base/third_party/xdg_mime" ;LGPL2=2E1+ or Academic 2=2E0 >+ "base/third_party/xdg_user_dirs" ;Expat >+ "chrome/third_party/mozilla_security_manager" >;MPL-1=2E1/GPL2+/LGPL2=2E1+ >+ "courgette/third_party/bsdiff" ;BSD-2, BSD protection license >+ "courgette/third_party/divsufsort" ;Expat >+ "net/third_party/http2" ;BSD-3 >+ "net/third_party/mozilla_security_manager" ;MPL-1=2E1/GPL2+/LGPL2=2E= 1+ >+ "net/third_party/nss" ;MPL-2=2E0 >+ "net/third_party/quic" ;BSD-3 >+ "net/third_party/spdy" ;BSD-3 >+ "net/third_party/uri_template" ;ASL2=2E0 >+ "third_party/abseil-cpp" ;ASL2=2E0 >+ "third_party/adobe/flash/flapper_version=2Eh" ;no license, trivial >+ "third_party/angle" ;BSD-3 >+ "third_party/angle/src/common/third_party/base" ;BSD-3 >+ "third_party/angle/src/common/third_party/smhasher" ;Public domain >+ "third_party/angle/src/common/third_party/xxhash" ;BSD-2 >+ "third_party/angle/src/third_party/compiler" ;BSD-2 >+ "third_party/angle/src/third_party/libXNVCtrl" ;Expat >+ "third_party/angle/src/third_party/trace_event" ;BSD-3 >+ "third_party/angle/third_party/glslang" ;BSD-3 >+ "third_party/angle/third_party/spirv-headers" ;Expat >+ "third_party/angle/third_party/spirv-tools" ;Expat >+ "third_party/angle/third_party/vulkan-headers" ;ASL2=2E0 >+ "third_party/angle/third_party/vulkan-loader" ;ASL2=2E0 >+ "third_party/angle/third_party/vulkan-tools" ;ASL2=2E0 >+ "third_party/angle/third_party/vulkan-validation-layers" ;ASL2=2E0 >+ "third_party/apple_apsl" ;APSL2=2E0 >+ "third_party/blink" ;BSD-3 >+ "third_party/boringssl" ;OpenSSL/ISC (Google additions are ISC) >+ "third_party/boringssl/src/third_party/fiat" ;Expat >+ "third_party/breakpad" ;BSD-3 >+ "third_party/brotli" ;Expat >+ "third_party/cacheinvalidation" ;ASL2=2E0 >+ "third_party/catapult" ;BSD-3 >+ "third_party/catapult/common/py_vulcanize/third_party/rcssmin" >;ASL2=2E0 >+ "third_party/catapult/common/py_vulcanize/third_party/rjsmin" >;ASL2=2E0 >+ "third_party/catapult/third_party/polymer" ;BSD-3 >+ "third_party/catapult/tracing/third_party/d3" ;BSD-3 >+ "third_party/catapult/tracing/third_party/gl-matrix" ;Expat >+ "third_party/catapult/tracing/third_party/jszip" ;Expat or GPL3 >+ "third_party/catapult/tracing/third_party/mannwhitneyu" ;Expat >+ "third_party/catapult/tracing/third_party/oboe" ;BSD-2 >+ "third_party/catapult/tracing/third_party/pako" ;Expat >+ "third_party/ced" ;BSD-3 >+ "third_party/cld_3" ;ASL2=2E0 >+ "third_party/closure_compiler" ;ASL2=2E0 >+ "third_party/crashpad" ;ASL2=2E0 >+ "third_party/crashpad/crashpad/third_party/zlib/zlib_crashpad=2Eh" >;Zlib >+ "third_party/crc32c" ;BSD-3 >+ "third_party/cros_system_api" ;BSD-3 >+ "third_party/dom_distiller_js" ;BSD-3 >+ "third_party/fips181" ;BSD-3 >+ "third_party/flatbuffers" ;ASL2=2E0 >+ "third_party/google_input_tools" ;ASL2=2E0 >+ "third_party/google_input_tools/third_party/closure_library" >;ASL2=2E0 >+ =20 >"third_party/google_input_tools/third_party/closure_library/third_party/c= losure" >;Expat >+ "third_party/googletest" ;BSD-3 >+ "third_party/hunspell" ;MPL1=2E1/GPL2+/LGPL2=2E1+ >+ "third_party/iccjpeg" ;IJG >+ "third_party/inspector_protocol" ;BSD-3 >+ "third_party/jinja2" ;BSD-3 >+ "third_party/jstemplate" ;ASL2=2E0 >+ "third_party/khronos" ;Expat, SGI >+ "third_party/leveldatabase" ;BSD-3 >+ "third_party/libXNVCtrl" ;Expat >+ "third_party/libaddressinput" ;ASL2=2E0 >+ "third_party/libaom" ;BSD-2 or "Alliance for Open Media Patent >License 1=2E0" >+ "third_party/libaom/source/libaom/third_party/vector" ;Expat >+ "third_party/libaom/source/libaom/third_party/x86inc" ;ISC >+ "third_party/libjingle_xmpp" ;BSD-3 >+ "third_party/libphonenumber" ;ASL2=2E0 >+ "third_party/libsecret" ;LGPL2=2E1+ >+ "third_party/libsrtp" ;BSD-3 >+ "third_party/libsync" ;ASL2=2E0 >+ "third_party/libudev" ;LGPL2=2E1+ >+ "third_party/libwebm" ;BSD-3 >+ "third_party/libxml/chromium" ;BSD-3 >+ "third_party/libyuv" ;BSD-3 >+ "third_party/lss" ;BSD-3 >+ "third_party/markupsafe" ;BSD-3 >+ "third_party/mesa_headers" ;Expat, SGI >+ "third_party/metrics_proto" ;BSD-3 >+ "third_party/modp_b64" ;BSD-3 >+ "third_party/nasm" ;BSD-2 >+ "third_party/node" ;Expat >+ =20 >"third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2" >;BSD-2 >+ "third_party/ots" ;BSD-3 >+ "third_party/pdfium" ;BSD-3 >+ "third_party/pdfium/third_party/agg23" ;Expat >+ "third_party/pdfium/third_party/base" ;BSD-3 >+ "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=2Eh" >;FreeType >+ "third_party/ply" ;BSD-3 >+ "third_party/polymer" ;BSD-3 >+ "third_party/protobuf" ;BSD-3 >+ "third_party/protobuf/third_party/six" ;Expat >+ "third_party/pyjson5" ;ASL2=2E0 >+ "third_party/qcms" ;Expat >+ "third_party/rnnoise" ;BSD-3 >+ "third_party/s2cellid" ;ASL2=2E0 >+ "third_party/sfntly" ;ASL2=2E0 >+ "third_party/skia" ;BSD-3 >+ "third_party/skia/third_party/gif" ;MPL1=2E1/GPL2+/LGPL2=2E1+ >+ "third_party/skia/third_party/skcms" ;BSD-3 >+ "third_party/skia/third_party/vulkan" ;BSD-3 >+ "third_party/smhasher" ;Expat, public domain >+ "third_party/speech-dispatcher" ;GPL2+ >+ "third_party/spirv-headers" ;ASL2=2E0 >+ "third_party/SPIRV-Tools" ;ASL2=2E0 >+ "third_party/sqlite" ;Public domain >+ "third_party/ungoogled" ;BSD-3 >+ "third_party/usb_ids" ;BSD-3 >+ "third_party/usrsctp" ;BSD-2 >+ "third_party/web-animations-js" ;ASL2=2E0 >+ "third_party/webdriver" ;ASL2=2E0 >+ "third_party/webrtc" ;BSD-3 >+ "third_party/webrtc/common_audio/third_party/fft4g" ;Non-copyleft >+ "third_party/webrtc/common_audio/third_party/spl_sqrt_floor" >;Public domain >+ "third_party/webrtc/modules/third_party/fft" ;Non-copyleft >+ "third_party/webrtc/modules/third_party/g711" ;Public domain >+ "third_party/webrtc/modules/third_party/g722" ;Public domain >+ "third_party/webrtc/rtc_base/third_party/base64" ;Non-copyleft >+ "third_party/webrtc/rtc_base/third_party/sigslot" ;Public domain >+ "third_party/widevine/cdm/widevine_cdm_version=2Eh" ;BSD-3 >+ "third_party/widevine/cdm/widevine_cdm_common=2Eh" ;BSD-3 >+ "third_party/woff2" ;ASL2=2E0 >+ "third_party/xdg-utils" ;Expat >+ "third_party/yasm/run_yasm=2Epy" ;BSD-2 or BSD-3 >+ "third_party/zlib/google" ;BSD-3 >+ "url/third_party/mozilla" ;BSD-3, MPL1=2E1/GPL2+/LGPL2=2E1+ >+ "v8/src/third_party/utf8-decoder" ;Expat >+ "v8/src/third_party/valgrind" ;BSD-4 >+ "v8/third_party/inspector_protocol" ;BSD-3 >+ "v8/third_party/v8/builtins")) ;PSFL >+ >+(define* (computed-origin-method gexp-promise hash-algo hash >+ #:optional (name "source") >+ #:key (system (%current-system)) >+ (guile (default-guile))) >+ "Return a derivation that executes the G-expression that results >+from forcing GEXP-PROMISE=2E" >+ (mlet %store-monad ((guile (package->derivation guile system))) >+ (gexp->derivation (or name "computed-origin") >+ (force gexp-promise) >+ #:system system >+ #:guile-for-build guile))) >+ >+(define %chromium-version "72=2E0=2E3626=2E81") >+(define %ungoogled-revision >"f9b9074c322a67b04baf0982797cd7b7e09614b5") >+ >+;; This is a computed origin that does the following: >+;; 1) Runs the Ungoogled scripts on a pristine Chromium tarball=2E >+;; 2) Prunes all third_party folders that are not explicitly >preserved=2E >+;; 3) Adjusts "GN" build files such that system libraries are >preferred=2E >+(define ungoogled-chromium-source >+ (let* ((chromium-source >+ (origin >+ (method url-fetch) >+ (uri (string-append >"https://commondatastorage=2Egoogleapis=2Ecom" >+ "/chromium-browser-official/chromium-" >+ %chromium-version "=2Etar=2Exz")) >+ (sha256 >+ (base32 >+ =20 >"01l0vlvcckpag376mjld7qprv63l0z8li689k0h6v3h0i7irzs6z")))) >+ (ungoogled-source >+ (origin >+ (method git-fetch) >+ (uri (git-reference (url >"https://github=2Ecom/mbakke/ungoogled-chromium") >+ (commit %ungoogled-revision))) >+ (file-name (git-file-name "ungoogled-chromium" >+ (string-take %ungoogled-revision >7))) >+ (sha256 >+ (base32 >+ =20 >"0gmk1n3i7lbm7rw8zl4df171yhvrlimj8ksj096bf2dlfhbd44rb"))))) >+ >+ (origin >+ (method computed-origin-method) >+ (file-name (string-append "ungoogled-chromium-" >%chromium-version "=2Etar=2Exz")) >+ (sha256 #f) >+ (uri >+ (delay >+ (with-imported-modules '((guix build utils)) >+ #~(begin >+ (use-modules (guix build utils)) >+ (let ((chromium-dir (string-append "chromium-" >#$%chromium-version)) >+ (preserved-files (list >#$@%preserved-third-party-files))) >+ >+ (mkdir "/tmp/bin") >+ (set-path-environment-variable >+ "PATH" '("bin") >+ (list "/tmp" >+ #+(canonical-package patch) >+ #+(canonical-package xz) >+ #+(canonical-package tar) >+ #+python-2 >+ #+python)) >+ >+ (copy-recursively #+ungoogled-source >"/tmp/ungoogled") >+ >+ (with-directory-excursion "/tmp/ungoogled" >+ >+ (format #t "Unpacking chromium tarball=2E=2E=2E~%") >+ (force-output) >+ (invoke "tar" "xf" #+chromium-source) >+ >+ (format #t "Ungooglifying=2E=2E=2E~%") >+ (force-output) >+ (invoke "python3" "run_buildkit_cli=2Epy" "prune" >+ "-b" "config_bundles/guix" chromium-dir) >+ (invoke "python3" "run_buildkit_cli=2Epy" "patches" >"apply" >+ "-b" "config_bundles/guix" chromium-dir) >+ (invoke "python3" "run_buildkit_cli=2Epy" "domains" >"apply" >+ "-b" "config_bundles/linux_rooted" >+ "-c" "/tmp/domainscache=2Etar=2Egz" >chromium-dir) >+ >+ (with-directory-excursion chromium-dir >+ (format #t "Pruning third party files=2E=2E=2E~%") >+ (force-output) >+ (apply invoke "python" >+ =20 >"build/linux/unbundle/remove_bundled_libraries=2Epy" >+ "--do-remove" preserved-files) >+ >+ (format #t "Replacing GN files=2E=2E=2E~%") >+ (force-output) >+ (invoke "python3" >"build/linux/unbundle/replace_gn_files=2Epy" >+ "--system-libraries" "ffmpeg" "flac" >"fontconfig" >+ "freetype" "harfbuzz-ng" "icu" "libdrm" >"libevent" >+ "libjpeg" "libpng" "libvpx" "libwebp" >"libxml" >+ "libxslt" "openh264" "opus" "re2" >"snappy" "yasm" >+ "zlib")) >+ >+ (format #t (string-append "Packing new Ungoogled >tarball =2E=2E=2E~%")) >+ (force-output) >+ (invoke "tar" "cvfa" #$output >+ ;; Avoid non-determinism in the archive=2E >+ "--mtime=3D@0" >+ "--owner=3Droot:0" >+ "--group=3Droot:0" >+ "--sort=3Dname" >+ chromium-dir) >+ >+ #t))))))))) >+ >+(define opus+custom >+ (package/inherit opus >+ (name "opus+custom") >+ (arguments >+ (substitute-keyword-arguments (package-arguments opus) >+ ((#:configure-flags flags ''()) >+ ;; Opus Custom is an optional extension of the Opus >+ ;; specification that allows for unsupported frame >+ ;; sizes=2E Chromium requires that this is enabled=2E >+ `(cons "--enable-custom-modes" >+ ,flags)))))) >+ >+(define libvpx/chromium >+ ;; Chromium 66 and later requires an unreleased libvpx, so we take >the >+ ;; commit from "third_party/libvpx/README=2Echromium" in the tarball= =2E >+ (let ((version (package-version libvpx)) >+ (commit "e188b5435de71bcd602c378f1ac0441111f0f915") >+ (revision "0")) >+ (package/inherit libvpx >+ (name "libvpx-chromium") >+ (version (git-version version revision commit)) >+ (source (origin >+ (method git-fetch) >+ (uri (git-reference >+ (url >"https://chromium=2Egooglesource=2Ecom/webm/libvpx") >+ (commit commit))) >+ (file-name (git-file-name name version)) >+ (sha256 >+ (base32 >+ =20 >"0v7lzvgy45zh7zwzmmzkvbcqmhs4xa97z0h97hd3j6myrxcfz1n9"))))))) >+ >+;; Transitional package until HarfBuzz 2=2E2 is available in Guix master >branch=2E >+(define harfbuzz/chromium >+ (package/inherit harfbuzz >+ (version "2=2E2=2E0") >+ (source (origin >+ (inherit (package-source harfbuzz)) >+ (uri (string-append >"https://www=2Efreedesktop=2Eorg/software/harfbuzz" >+ "/release/harfbuzz-" version >"=2Etar=2Ebz2")) >+ (sha256 >+ (base32 >+ =20 >"047q63jr513azf3g1y7f5xn60b4jdjs9zsmrx04sfw5rasyzrk5p")))))) >+ >+(define-public ungoogled-chromium >+ (package >+ (name "ungoogled-chromium") >+ (version %chromium-version) >+ (synopsis "Graphical web browser") >+ (source ungoogled-chromium-source) >+ (build-system gnu-build-system) >+ (arguments >+ `(#:tests? #f >+ ;; FIXME: There is a "gn" option specifically for setting >-rpath, but >+ ;; it overrides the RUNPATH set by the linker=2E >+ #:validate-runpath? #f >+ #:modules ((guix build gnu-build-system) >+ (guix build utils) >+ (ice-9 ftw) >+ (ice-9 regex) >+ (srfi srfi-26)) >+ #:configure-flags >+ ;; See tools/gn/docs/cookbook=2Emd and >+ ;; https://www=2Echromium=2Eorg/developers/gn-build-configuration >+ ;; for usage=2E Run "=2E/gn args =2E --list" in the Release >+ ;; directory for an exhaustive list of supported flags=2E >+ ;; (Note: The 'configure' phase will do that for you=2E) >+ (list "is_debug=3Dfalse" >+ "use_gold=3Dfalse" >+ "use_lld=3Dfalse" >+ "linux_use_bundled_binutils=3Dfalse" >+ "use_custom_libcxx=3Dfalse" >+ "use_sysroot=3Dfalse" >+ "enable_precompiled_headers=3Dfalse" >+ "goma_dir=3D\"\"" >+ "enable_nacl=3Dfalse" >+ "enable_nacl_nonsfi=3Dfalse" >+ "use_allocator=3D\"none\"" ;don't use tcmalloc >+ "use_unofficial_version_number=3Dfalse" >+ >+ ;; Define a custom toolchain that simply looks up CC, AR >and >+ ;; friends from the environment=2E >+ =20 >"custom_toolchain=3D\"//build/toolchain/linux/unbundle:default\"" >+ =20 >"host_toolchain=3D\"//build/toolchain/linux/unbundle:default\"" >+ >+ ;; Don't assume it's clang=2E >+ "is_clang=3Dfalse" >+ >+ ;; Optimize for building everything at once, as opposed >to >+ ;; incrementally for development=2E See "docs/jumbo=2Emd"= =2E >+ "use_jumbo_build=3Dtrue" >+ >+ ;; Disable type-checking for the Web UI to avoid a Java >dependency=2E >+ "closure_compile=3Dfalse" >+ >+ ;; Disable debugging features to save space=2E >+ "blink_symbol_level=3D0" >+ "enable_iterator_debugging=3Dfalse" >+ >+ ;; Some of the unbundled libraries throws deprecation >+ ;; warnings, etc=2E Ignore it=2E >+ "treat_warnings_as_errors=3Dfalse" >+ >+ ;; Don't add any API keys=2E End users can set them in the >+ ;; environment if desired=2E See >+ ;; >=2E >+ "use_official_google_api_keys=3Dfalse" >+ >+ ;; Disable "safe browsing", which pulls in a dependency >on >+ ;; the nonfree "unrar" program (as of m66)=2E >+ "safe_browsing_mode=3D0" >+ >+ ;; Disable "field trials"=2E >+ "fieldtrial_testing_like_official_build=3Dtrue" >+ >+ ;; Ungoogled components=2E >+ "enable_mdns=3Dfalse" >+ "enable_one_click_signin=3Dfalse" >+ "enable_reading_list=3Dfalse" >+ "enable_remoting=3Dfalse" >+ "enable_reporting=3Dfalse" >+ "enable_service_discovery=3Dfalse" >+ "enable_swiftshader=3Dfalse" >+ "use_vaapi=3Dtrue" >+ >+ ;; Use system libraries where possible=2E >+ "use_system_freetype=3Dtrue" >+ "use_system_harfbuzz=3Dtrue" >+ "use_system_lcms2=3Dtrue" >+ "use_system_libdrm=3Dtrue" >+ "use_system_libjpeg=3Dtrue" >+ "use_system_libpng=3Dtrue" >+ ;;"use_system_libsync=3Dtrue" >+ "use_system_zlib=3Dtrue" >+ >+ "use_gnome_keyring=3Dfalse" ;deprecated by libsecret >+ "use_openh264=3Dtrue" >+ "use_pulseaudio=3Dtrue" >+ "link_pulseaudio=3Dtrue" >+ >+ ;; Don't arbitrarily restrict formats supported by system >ffmpeg=2E >+ "proprietary_codecs=3Dtrue" >+ "ffmpeg_branding=3D\"Chrome\"" >+ >+ ;; WebRTC stuff=2E >+ "rtc_use_h264=3Dtrue" >+ ;; Don't use bundled sources=2E >+ "rtc_build_json=3Dfalse" >+ "rtc_build_libevent=3Dfalse" >+ "rtc_build_libvpx=3Dfalse" >+ "rtc_build_opus=3Dfalse" >+ "rtc_build_ssl=3Dfalse" >+ >+ "rtc_build_libsrtp=3Dtrue" ;FIXME: fails to find headers >+ "rtc_build_usrsctp=3Dtrue" ;TODO: package this >+ (string-append "rtc_jsoncpp_root=3D\"" >+ (assoc-ref %build-inputs "jsoncpp") >+ "/include/jsoncpp/json\"") >+ (string-append "rtc_ssl_root=3D\"" >+ (assoc-ref %build-inputs "openssl") >+ "/include/openssl\"")) >+ #:phases >+ (modify-phases %standard-phases >+ (add-after 'unpack 'patch-stuff >+ (lambda* (#:key inputs #:allow-other-keys) >+ (substitute* "printing/cups_config_helper=2Epy" >+ (("cups_config =3D=2E*") >+ (string-append "cups_config =3D '" (assoc-ref inputs >"cups") >+ "/bin/cups-config'\n"))) >+ >+ (substitute* >+ '("base/process/launch_posix=2Ecc" >+ =20 >"base/third_party/dynamic_annotations/dynamic_annotations=2Ec" >+ "sandbox/linux/seccomp-bpf/sandbox_bpf=2Ecc" >+ "sandbox/linux/services/credentials=2Ecc" >+ "sandbox/linux/services/namespace_utils=2Ecc" >+ "sandbox/linux/services/syscall_wrappers=2Ecc" >+ "sandbox/linux/syscall_broker/broker_host=2Ecc") >+ (("include \"base/third_party/valgrind/") "include >\"valgrind/")) >+ >+ (for-each (lambda (file) >+ (substitute* file >+ ;; Fix opus include path=2E >+ ;; Do not substitute opus_private=2Eh=2E >+ (("#include \"opus\\=2Eh\"") >+ "#include \"opus/opus=2Eh\"") >+ (("#include \"opus_custom\\=2Eh\"") >+ "#include \"opus/opus_custom=2Eh\"") >+ (("#include \"opus_defines\\=2Eh\"") >+ "#include \"opus/opus_defines=2Eh\"") >+ (("#include \"opus_multistream\\=2Eh\"") >+ "#include \"opus/opus_multistream=2Eh\"") >+ (("#include \"opus_types\\=2Eh\"") >+ "#include \"opus/opus_types=2Eh\""))) >+ (find-files (string-append >"third_party/webrtc/modules" >+ =20 >"/audio_coding/codecs/opus"))) >+ >+ (substitute* "chrome/common/chrome_paths=2Ecc" >+ (("/usr/share/chromium/extensions") >+ ;; TODO: Add ~/=2Eguix-profile=2E >+ =20 >"/run/current-system/profile/share/chromium/extensions")) >+ >+ ;; XXX: Should be unnecessary when use_system_lcms2=3Dtrue= =2E >+ (substitute* >"third_party/pdfium/core/fxcodec/codec/ccodec_iccmodule=2Eh" >+ (("include \"third_party/lcms/include/lcms2\\=2Eh\"") >+ "include \"lcms2=2Eh\"")) >+ >+ (substitute* >+ =20 >"third_party/breakpad/breakpad/src/common/linux/libcurl_wrapper=2Eh" >+ (("include \"third_party/curl") "include \"curl")) >+ >+ (substitute* "third_party/webrtc/rtc_base/strings/json=2Eh" >+ (("#include \"third_party/jsoncpp/") "#include >\"json/")) >+ >+ (substitute* "media/base/decode_capabilities=2Ecc" >+ (("third_party/libvpx/source/libvpx/") "")) >+ >+ (substitute* "ui/gfx/skia_util=2Eh" >+ (("third_party/vulkan/include/") "")) >+ >+ ;; Building chromedriver embeds some files using the ZIP >+ ;; format which doesn't support timestamps before >+ ;; 1980=2E Therefore, advance the timestamps of the files >+ ;; which are included so that building chromedriver >+ ;; works=2E >+ (let ((circa-1980 (* 10 366 24 60 60))) >+ (for-each (lambda (file) >+ (utime file circa-1980 circa-1980)) >+ =20 >'("chrome/test/chromedriver/extension/background=2Ejs" >+ =20 >"chrome/test/chromedriver/extension/manifest=2Ejson"))) >+ >+ #t)) >+ (add-before 'configure 'prepare-build-environment >+ (lambda* (#:key inputs #:allow-other-keys) >+ >+ ;; Make sure the right build tools are used=2E >+ (setenv "AR" "ar") (setenv "NM" "nm") >+ (setenv "CC" "gcc") (setenv "CXX" "g++") >+ >+ ;; Work around =2E >+ (unsetenv "C_INCLUDE_PATH") >+ (unsetenv "CPLUS_INCLUDE_PATH") >+ >+ ;; TODO: pre-compile instead=2E Avoids a race condition=2E >+ (setenv "PYTHONDONTWRITEBYTECODE" "1") >+ >+ ;; XXX: How portable is this=2E >+ (mkdir-p "third_party/node/linux/node-linux-x64") >+ (symlink (string-append (assoc-ref inputs "node") "/bin") >+ "third_party/node/linux/node-linux-x64/bin") >+ >+ #t)) >+ (replace 'configure >+ (lambda* (#:key configure-flags #:allow-other-keys) >+ (let ((args (string-join configure-flags " "))) >+ ;; Generate ninja build files=2E >+ (invoke "gn" "gen" "out/Release" >+ (string-append "--args=3D" args)) >+ >+ ;; Print the full list of supported arguments as well >as >+ ;; their current status for convenience=2E >+ (format #t "Dumping configure flags=2E=2E=2E\n") >+ (invoke "gn" "args" "out/Release" "--list")))) >+ (replace 'build >+ (lambda* (#:key outputs #:allow-other-keys) >+ (invoke "ninja" "-C" "out/Release" >+ "-j" (number->string (parallel-job-count)) >+ "chrome" >+ "chromedriver"))) >+ (replace 'install >+ (lambda* (#:key inputs outputs #:allow-other-keys) >+ (let* ((out (assoc-ref outputs "out")) >+ (bin (string-append out "/bin")) >+ (exe (string-append bin "/chromium")) >+ (lib (string-append out "/lib")) >+ (man (string-append out >"/share/man/man1")) >+ (applications (string-append out >"/share/applications")) >+ (install-regexp (make-regexp "\\=2E(bin|pak)$")) >+ (locales (string-append lib "/locales")) >+ (resources (string-append lib "/resources")) >+ (preferences (assoc-ref inputs >"master-preferences")) >+ (gtk+ (assoc-ref inputs "gtk+")) >+ (mesa (assoc-ref inputs "mesa")) >+ (nss (assoc-ref inputs "nss")) >+ (udev (assoc-ref inputs "udev")) >+ (sh (which "sh"))) >+ >+ (substitute* '("chrome/app/resources/manpage=2E1=2Ein" >+ =20 >"chrome/installer/linux/common/desktop=2Etemplate") >+ (("@@MENUNAME@@") "Chromium") >+ (("@@PACKAGE@@") "chromium") >+ (("/usr/bin/@@USR_BIN_SYMLINK_NAME@@") exe)) >+ >+ (mkdir-p man) >+ (copy-file "chrome/app/resources/manpage=2E1=2Ein" >+ (string-append man "/chromium=2E1")) >+ >+ (mkdir-p applications) >+ (copy-file >"chrome/installer/linux/common/desktop=2Etemplate" >+ (string-append applications >"/chromium=2Edesktop")) >+ >+ (mkdir-p lib) >+ (copy-file preferences (string-append lib >"/master_preferences")) >+ >+ (with-directory-excursion "out/Release" >+ (for-each (lambda (file) >+ (install-file file lib)) >+ (scandir "=2E" (cut regexp-exec >install-regexp <>))) >+ (copy-file "chrome" (string-append lib "/chromium")) >+ >+ ;; TODO: Install icons from "=2E=2E/=2E=2E/chrome/app/t= hemes" >into >+ ;; "out/share/icons/hicolor/$size"=2E >+ (install-file >+ "product_logo_48=2Epng" >+ (string-append out >"/share/icons/48x48/chromium=2Epng")) >+ >+ (copy-recursively "locales" locales) >+ (copy-recursively "resources" resources) >+ >+ (mkdir-p bin) >+ (symlink "=2E=2E/lib/chromium" exe) >+ (install-file "chromedriver" bin) >+ >+ (wrap-program exe >+ ;; TODO: Get these in RUNPATH=2E >+ `("LD_LIBRARY_PATH" ":" prefix >+ (,(string-append lib ":" nss "/lib/nss:" gtk+ >"/lib:" >+ mesa "/lib:" udev "/lib"))) >+ ;; Avoid file manager crash=2E See >=2E >+ `("XDG_DATA_DIRS" ":" prefix (,(string-append gtk+ >"/share")))) >+ #t))))))) >+ (native-inputs >+ `(("bison" ,bison) >+ ("gcc" ,gcc-8) >+ ("gn" ,gn) >+ ("gperf" ,gperf) >+ ("ninja" ,ninja) >+ ("node" ,node) >+ ("pkg-config" ,pkg-config) >+ ("which" ,which) >+ ("yasm" ,yasm) >+ >+ ;; This file contains defaults for new user profiles=2E >+ ("master-preferences" ,(local-file >"aux-files/chromium/master-preferences=2Ejson")) >+ >+ ("python-beautifulsoup4" ,python2-beautifulsoup4) >+ ("python-html5lib" ,python2-html5lib) >+ ("python" ,python-2))) >+ (inputs >+ `(("alsa-lib" ,alsa-lib) >+ ("atk" ,atk) >+ ("cups" ,cups) >+ ("curl" ,curl) >+ ("dbus" ,dbus) >+ ("dbus-glib" ,dbus-glib) >+ ("expat" ,expat) >+ ("flac" ,flac) >+ ("ffmpeg" ,ffmpeg) >+ ("fontconfig" ,fontconfig) >+ ("freetype" ,freetype) >+ ("gdk-pixbuf" ,gdk-pixbuf) >+ ("glib" ,glib) >+ ("gtk+" ,gtk+) >+ ("harfbuzz" ,harfbuzz/chromium) >+ ("icu4c" ,icu4c) >+ ("jsoncpp" ,jsoncpp) >+ ("lcms" ,lcms) >+ ("libevent" ,libevent) >+ ("libffi" ,libffi) >+ ("libjpeg-turbo" ,libjpeg-turbo) >+ ("libpng" ,libpng) >+ ("libva" ,libva) >+ ("libvpx" ,libvpx/chromium) >+ ("libwebp" ,libwebp) >+ ("libx11" ,libx11) >+ ("libxcb" ,libxcb) >+ ("libxcomposite" ,libxcomposite) >+ ("libxcursor" ,libxcursor) >+ ("libxdamage" ,libxdamage) >+ ("libxext" ,libxext) >+ ("libxfixes" ,libxfixes) >+ ("libxi" ,libxi) >+ ("libxml2" ,libxml2) >+ ("libxrandr" ,libxrandr) >+ ("libxrender" ,libxrender) >+ ("libxscrnsaver" ,libxscrnsaver) >+ ("libxslt" ,libxslt) >+ ("libxtst" ,libxtst) >+ ("mesa" ,mesa) >+ ("minizip" ,minizip) >+ ("mit-krb5" ,mit-krb5) >+ ("nss" ,nss) >+ ("openh264" ,openh264) >+ ("openjpeg" ,openjpeg) ;PDFium only >+ ("openssl" ,openssl) >+ ("opus" ,opus+custom) >+ ("pango" ,pango) >+ ("pciutils" ,pciutils) >+ ("pulseaudio" ,pulseaudio) >+ ("re2" ,re2) >+ ("snappy" ,snappy) >+ ("speech-dispatcher" ,speech-dispatcher) >+ ("udev" ,eudev) >+ ("valgrind" ,valgrind) >+ ("vulkan-headers" ,vulkan-headers))) >+ (home-page "https://www=2Echromium=2Eorg/") >+ (description >+ "Ungoogled-Chromium is the Chromium web browser, sans integration >with >+Google web services=2E") >+ ;; Chromium is developed as BSD-3, but bundles a large number of >third-party >+ ;; components with other licenses=2E For full information, see >chrome://credits=2E >+ (license (list license:bsd-3 >+ license:bsd-2 >+ license:expat >+ license:asl2=2E0 >+ license:mpl1=2E1 >+ license:mpl2=2E0 >+ license:public-domain >+ license:isc >+ (license:non-copyleft "chrome://credits" >+ "See chrome://credits for >more information=2E") >+ license:lgpl2=2E1+)))) >--=20 >2=2E20=2E1 Wow=2E=20 Nice work! =F0=9F=98=83 --=20 Sent from my k-9 mail for Android=2E ------OLEBV8UXLOH3TYKFR6Q74PQLQ3834I Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Marius Bakke <mbakke= @fastmail=2Ecom> skrev: (2 februari 2019 20:20:23 CET)
Thanks to Marks beautiful "computed-origin-method", =
Ungoogled-Chromium
is finally ready for inclusion in Guix=2E

Feat= ures:
* Chromium 72=2E
* No unsolicited network traffic=2E
* Free = software only=2E
* No DRM=2E
* Not an April Fools joke=2E

It's= currently using my trivial "fork" of Ungoogled-Chromium[0], which
will = be upstreamed once the upstream reorganization[1] is done=2E

Comment= s appreciated!

[0]: https://github= =2Ecom/mbakke/ungoogled-chromium/commit/f9b9074c322a67b04baf0982797cd7b7e09= 614b5
[1]: https://github=2Ecom/Eloston/ungoogled-chromium/issues/651

* gnu/packages/aux-files/chromium/master-preferences=2Ejson,
gn= u/packages/chromium=2Escm: New files=2E
* gnu/local=2Emk (GNU_SYSTEM_MOD= ULES): Adjust accordingly=2E
gnu/local=2Emk = | 1 +
=2E=2E=2E/chromium/master-preferences=2Ejson | = 26 +
gnu/packages/chromium=2Escm | 741 ++++++++++++= ++++++
3 files changed, 768 insertions(+)
create mode 100644 gnu/pa= ckages/aux-files/chromium/master-preferences=2Ejson
create mode 100644 = gnu/packages/chromium=2Escm

diff --git a/gnu/local=2Emk b/gnu/local= =2Emk
index 82db1488d6=2E=2Eb5e937cdd7 100644
--- a/gnu/local=2Emk+++ b/gnu/local=2Emk
@@ -100,6 +100,7 @@ GNU_SYSTEM_MODULES =3D \ %D%/packages/check=2Escm \
%D%/packages/chemistry=2Escm \
= %D%/packages/chez=2Escm \
+ %D%/packages/chromium=2Escm \
= %D%/packages/ci=2Escm \
%D%/packages/cinnamon=2Escm \
%D%= /packages/clojure=2Escm \
diff --git a/gnu/packages/aux-files/chromium= /master-preferences=2Ejson b/gnu/packages/aux-files/chromium/master-prefere= nces=2Ejson
new file mode 100644
index 0000000000=2E=2E0caa7cc4cd
= --- /dev/null
+++ b/gnu/packages/aux-files/chromium/master-preferences= =2Ejson
@@ -0,0 +1,26 @@
+{
+ "distribution": {
+ "import_= bookmarks": false,
+ "make_chrome_default": false,
+ "make_ch= rome_default_for_user": false,
+ "verbose_logging": true,
+ "= skip_first_run_ui": true,
+ "suppress_first_run_default_browser_prom= pt": true
+ },
+ "browser": {
+ "has_seen_welcome_page" : tr= ue,
+ "check_default_browser" : false
+ },
+ "dns_prefetchin= g": {
+ "enabled": false
+ },
+ "alternate_error_pages": {+ "enabled": false
+ },
+ "hardware": {
+ "audio_capture_= enabled": false
+ },
+ "default_apps": "noinstall",
+ "hide_web= _store_icon": true,
+ "homepage": "https://www=2Egnu=2Eorg/software/gui= x"
+}
diff --git a/gnu/packages/chromium=2Escm b/gnu/packages/chromiu= m=2Escm
new file mode 100644
index 0000000000=2E=2Eeb404246d3
--- = /dev/null
+++ b/gnu/packages/chromium=2Escm
@@ -0,0 +1,741 @@
+;;;= GNU Guix --- Functional package management for GNU
+;;; Copyright =C2= =A9 2019 Marius Bakke <mbakke@fastmail=2Ecom>
+;;;
+;;; GNU Gui= x is free software; you can redistribute it and/or modify it
+;;; under = the terms of the GNU General Public License as published by
+;;; the Fre= e Software Foundation; either version 3 of the License, or (at
+;;; your= option) any later version=2E
+;;;
+;;; GNU Guix is distributed in th= e hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without ev= en the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICU= LAR PURPOSE=2E See the
+;;; GNU General Public License for more details= =2E
+;;;
+;;; You should have received a copy of the GNU General Publ= ic License
+;;; along with GNU Guix=2E If not, see <
http://www=2Egnu=2Eorg/licenses/>=2E+
+(define-module (gnu packages chromium)
+ #:use-module ((guix lic= enses) #:prefix license:)
+ #:use-module (guix packages)
+ #:use-mo= dule (guix gexp)
+ #:use-module (guix store)
+ #:use-module (guix m= onads)
+ #:use-module (guix download)
+ #:use-module (guix git-down= load)
+ #:use-module (guix utils)
+ #:use-module (guix build-system= gnu)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages as= sembly)
+ #:use-module (gnu packages base)
+ #:use-module (gnu pack= ages bison)
+ #:use-module (gnu packages build-tools)
+ #:use-modul= e (gnu packages compression)
+ #:use-module (gnu packages cups)
+ #= :use-module (gnu packages curl)
+ #:use-module (gnu packages fontutils)=
+ #:use-module (gnu packages gcc)
+ #:use-module (gnu packages gho= stscript)
+ #:use-module (gnu packages gl)
+ #:use-module (gnu pack= ages glib)
+ #:use-module (gnu packages gnome)
+ #:use-module (gnu = packages gnuzilla)
+ #:use-module (gnu packages gperf)
+ #:use-modu= le (gnu packages gtk)
+ #:use-module (gnu packages icu4c)
+ #:use-m= odule (gnu packages image)
+ #:use-module (gnu packages libevent)
+ = #:use-module (gnu packages libffi)
+ #:use-module (gnu packages linux)=
+ #:use-module (gnu packages kerberos)
+ #:use-module (gnu package= s ninja)
+ #:use-module (gnu packages node)
+ #:use-module (gnu pac= kages pciutils)
+ #:use-module (gnu packages pkg-config)
+ #:use-mo= dule (gnu packages pulseaudio)
+ #:use-module (gnu packages python)
= + #:use-module (gnu packages python-web)
+ #:use-module (gnu packages = python-xyz)
+ #:use-module (gnu packages regex)
+ #:use-module (gnu= packages serialization)
+ #:use-module (gnu packages speech)
+ #:u= se-module (gnu packages tls)
+ #:use-module (gnu packages valgrind)
= + #:use-module (gnu packages vulkan)
+ #:use-module (gnu packages vide= o)
+ #:use-module (gnu packages xiph)
+ #:use-module (gnu packages = xml)
+ #:use-module (gnu packages xdisorg)
+ #:use-module (gnu pack= ages xorg))
+
+(define %preserved-third-party-files
+ '("base/thi= rd_party/dmg_fp" ;X11-style
+ "base/third_party/dynamic_annotations" = ;BSD-2
+ "base/third_party/icu" ;Unicode, X11-style
+ "base/thi= rd_party/superfasthash" ;BSD-3
+ "base/third_party/symbolize" ;BSD-3<= br>+ "base/third_party/xdg_mime" ;LGPL2=2E1+ or Academic 2=2E0
+ "= base/third_party/xdg_user_dirs" ;Expat
+ "chrome/third_party/mozilla_= security_manager" ;MPL-1=2E1/GPL2+/LGPL2=2E1+
+ "courgette/third_part= y/bsdiff" ;BSD-2, BSD protection license
+ "courgette/third_party/div= sufsort" ;Expat
+ "net/third_party/http2" ;BSD-3
+ "net/third_p= arty/mozilla_security_manager" ;MPL-1=2E1/GPL2+/LGPL2=2E1+
+ "net/thi= rd_party/nss" ;MPL-2=2E0
+ "net/third_party/quic" ;BSD-3
+ "net= /third_party/spdy" ;BSD-3
+ "net/third_party/uri_template" ;ASL2=2E0<= br>+ "third_party/abseil-cpp" ;ASL2=2E0
+ "third_party/adobe/flash= /flapper_version=2Eh" ;no license, trivial
+ "third_party/angle" ;BSD= -3
+ "third_party/angle/src/common/third_party/base" ;BSD-3
+ "= third_party/angle/src/common/third_party/smhasher" ;Public domain
+ "= third_party/angle/src/common/third_party/xxhash" ;BSD-2
+ "third_part= y/angle/src/third_party/compiler" ;BSD-2
+ "third_party/angle/src/thi= rd_party/libXNVCtrl" ;Expat
+ "third_party/angle/src/third_party/trac= e_event" ;BSD-3
+ "third_party/angle/third_party/glslang" ;BSD-3
+= "third_party/angle/third_party/spirv-headers" ;Expat
+ "third_par= ty/angle/third_party/spirv-tools" ;Expat
+ "third_party/angle/third_p= arty/vulkan-headers" ;ASL2=2E0
+ "third_party/angle/third_party/vulka= n-loader" ;ASL2=2E0
+ "third_party/angle/third_party/vulkan-tools" ;A= SL2=2E0
+ "third_party/angle/third_party/vulkan-validation-layers" ;A= SL2=2E0
+ "third_party/apple_apsl" ;APSL2=2E0
+ "third_party/bl= ink" ;BSD-3
+ "third_party/boringssl" ;OpenSSL/ISC (Google additions = are ISC)
+ "third_party/boringssl/src/third_party/fiat" ;Expat
+ = "third_party/breakpad" ;BSD-3
+ "third_party/brotli" ;Expat
+ = "third_party/cacheinvalidation" ;ASL2=2E0
+ "third_party/catapult" ;= BSD-3
+ "third_party/catapult/common/py_vulcanize/third_party/rcssmin= " ;ASL2=2E0
+ "third_party/catapult/common/py_vulcanize/third_party/r= jsmin" ;ASL2=2E0
+ "third_party/catapult/third_party/polymer" ;BSD-3<= br>+ "third_party/catapult/tracing/third_party/d3" ;BSD-3
+ "third= _party/catapult/tracing/third_party/gl-matrix" ;Expat
+ "third_party/= catapult/tracing/third_party/jszip" ;Expat or GPL3
+ "third_party/cat= apult/tracing/third_party/mannwhitneyu" ;Expat
+ "third_party/catapul= t/tracing/third_party/oboe" ;BSD-2
+ "third_party/catapult/tracing/th= ird_party/pako" ;Expat
+ "third_party/ced" ;BSD-3
+ "third_part= y/cld_3" ;ASL2=2E0
+ "third_party/closure_compiler" ;ASL2=2E0
+ = "third_party/crashpad" ;ASL2=2E0
+ "third_party/crashpad/crashpad/th= ird_party/zlib/zlib_crashpad=2Eh" ;Zlib
+ "third_party/crc32c" ;BSD-3=
+ "third_party/cros_system_api" ;BSD-3
+ "third_party/dom_dist= iller_js" ;BSD-3
+ "third_party/fips181" ;BSD-3
+ "third_party/= flatbuffers" ;ASL2=2E0
+ "third_party/google_input_tools" ;ASL2=2E0+ "third_party/google_input_tools/third_party/closure_library" ;ASL2= =2E0
+ "third_party/google_input_tools/third_party/closure_library/th= ird_party/closure" ;Expat
+ "third_party/googletest" ;BSD-3
+ "= third_party/hunspell" ;MPL1=2E1/GPL2+/LGPL2=2E1+
+ "third_party/iccjp= eg" ;IJG
+ "third_party/inspector_protocol" ;BSD-3
+ "third_par= ty/jinja2" ;BSD-3
+ "third_party/jstemplate" ;ASL2=2E0
+ "third= _party/khronos" ;Expat, SGI
+ "third_party/leveldatabase" ;BSD-3
+= "third_party/libXNVCtrl" ;Expat
+ "third_party/libaddressinput" ;= ASL2=2E0
+ "third_party/libaom" ;BSD-2 or "Alliance for Open Media Pa= tent License 1=2E0"
+ "third_party/libaom/source/libaom/third_party/v= ector" ;Expat
+ "third_party/libaom/source/libaom/third_party/x86inc"= ;ISC
+ "third_party/libjingle_xmpp" ;BSD-3
+ "third_party/libp= honenumber" ;ASL2=2E0
+ "third_party/libsecret" ;LGPL2=2E1+
+ "= third_party/libsrtp" ;BSD-3
+ "third_party/libsync" ;ASL2=2E0
+ = "third_party/libudev" ;LGPL2=2E1+
+ "third_party/libwebm" ;BSD-3
= + "third_party/libxml/chromium" ;BSD-3
+ "third_party/libyuv" ;BSD= -3
+ "third_party/lss" ;BSD-3
+ "third_party/markupsafe" ;BSD-3=
+ "third_party/mesa_headers" ;Expat, SGI
+ "third_party/metric= s_proto" ;BSD-3
+ "third_party/modp_b64" ;BSD-3
+ "third_party/= nasm" ;BSD-2
+ "third_party/node" ;Expat
+ "third_party/node/no= de_modules/polymer-bundler/lib/third_party/UglifyJS2" ;BSD-2
+ "third= _party/ots" ;BSD-3
+ "third_party/pdfium" ;BSD-3
+ "third_party= /pdfium/third_party/agg23" ;Expat
+ "third_party/pdfium/third_party/b= ase" ;BSD-3
+ "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=2Eh" ;FreeType+ "third_party/ply" ;BSD-3
+ "third_party/polymer" ;BSD-3
+ = "third_party/protobuf" ;BSD-3
+ "third_party/protobuf/third_party/si= x" ;Expat
+ "third_party/pyjson5" ;ASL2=2E0
+ "third_party/qcms= " ;Expat
+ "third_party/rnnoise" ;BSD-3
+ "third_party/s2cellid= " ;ASL2=2E0
+ "third_party/sfntly" ;ASL2=2E0
+ "third_party/ski= a" ;BSD-3
+ "third_party/skia/third_party/gif" ;MPL1=2E1/GPL2+/LGPL2= =2E1+
+ "third_party/skia/third_party/skcms" ;BSD-3
+ "third_pa= rty/skia/third_party/vulkan" ;BSD-3
+ "third_party/smhasher" ;Expat, = public domain
+ "third_party/speech-dispatcher" ;GPL2+
+ "third= _party/spirv-headers" ;ASL2=2E0
+ "third_party/SPIRV-Tools" ;ASL2=2E0=
+ "third_party/sqlite" ;Public domain
+ "third_party/ungoogled= " ;BSD-3
+ "third_party/usb_ids" ;BSD-3
+ "third_party/usrsctp"= ;BSD-2
+ "third_party/web-animations-js" ;ASL2=2E0
+ "third_pa= rty/webdriver" ;ASL2=2E0
+ "third_party/webrtc" ;BSD-3
+ "third= _party/webrtc/common_audio/third_party/fft4g" ;Non-copyleft
+ "third_= party/webrtc/common_audio/third_party/spl_sqrt_floor" ;Public domain
+ = "third_party/webrtc/modules/third_party/fft" ;Non-copyleft
+ "third= _party/webrtc/modules/third_party/g711" ;Public domain
+ "third_party= /webrtc/modules/third_party/g722" ;Public domain
+ "third_party/webrt= c/rtc_base/third_party/base64" ;Non-copyleft
+ "third_party/webrtc/rt= c_base/third_party/sigslot" ;Public domain
+ "third_party/widevine/cd= m/widevine_cdm_version=2Eh" ;BSD-3
+ "third_party/widevine/cdm/widevi= ne_cdm_common=2Eh" ;BSD-3
+ "third_party/woff2" ;ASL2=2E0
+ "th= ird_party/xdg-utils" ;Expat
+ "third_party/yasm/run_yasm=2Epy" ;BSD-2= or BSD-3
+ "third_party/zlib/google" ;BSD-3
+ "url/third_party= /mozilla" ;BSD-3, MPL1=2E1/GPL2+/LGPL2=2E1+
+ "v8/src/third_party/utf= 8-decoder" ;Expat
+ "v8/src/third_party/valgrind" ;BSD-4
+ "v8/= third_party/inspector_protocol" ;BSD-3
+ "v8/third_party/v8/builtins"= )) ;PSFL
+
+(define* (computed-origin-method gexp-promise hash-algo h= ash
+ #:optional (name "source")
+ = #:key (system (%current-system))
+ = (guile (default-guile)))
+ "Return a derivatio= n that executes the G-expression that results
+from forcing GEXP-PROMISE= =2E"
+ (mlet %store-monad ((guile (package->derivation guile system)= ))
+ (gexp->derivation (or name "computed-origin")
+ = (force gexp-promise)
+ #:system system+ #:guile-for-build guile)))
+
+(define %chrom= ium-version "72=2E0=2E3626=2E81")
+(define %ungoogled-revision "f9b9074c= 322a67b04baf0982797cd7b7e09614b5")
+
+;; This is a computed origin th= at does the following:
+;; 1) Runs the Ungoogled scripts on a pristine C= hromium tarball=2E
+;; 2) Prunes all third_party folders that are not ex= plicitly preserved=2E
+;; 3) Adjusts "GN" build files such that system l= ibraries are preferred=2E
+(define ungoogled-chromium-source
+ (let*= ((chromium-source
+ (origin
+ (method url-fetch)=
+ (uri (string-append "https://commondatastorage=2Egoogleapi= s=2Ecom"
+ "/chromium-browser-official/ch= romium-"
+ %chromium-version "=2Etar=2Exz= "))
+ (sha256
+ (base32
+ "01l= 0vlvcckpag376mjld7qprv63l0z8li689k0h6v3h0i7irzs6z"))))
+ (ungoog= led-source
+ (origin
+ (method git-fetch)
+ = (uri (git-reference (url "https://github=2Ecom/mbakke/ungoogled-ch= romium")
+ (commit %ungoogled-revision)))=
+ (file-name (git-file-name "ungoogled-chromium"
+ = (string-take %ungoogled-revision 7)))
+ = (sha256
+ (base32
+ "0gmk1n3i7lbm7= rw8zl4df171yhvrlimj8ksj096bf2dlfhbd44rb")))))
+
+ (origin
+ = (method computed-origin-method)
+ (file-name (string-append "ungo= ogled-chromium-" %chromium-version "=2Etar=2Exz"))
+ (sha256 #f)+ (uri
+ (delay
+ (with-imported-modules '((guix = build utils))
+ #~(begin
+ (use-modules (guix= build utils))
+ (let ((chromium-dir (string-append "ch= romium-" #$%chromium-version))
+ (preserved-files (l= ist #$@%preserved-third-party-files)))
+
+ (mkdir "/t= mp/bin")
+ (set-path-environment-variable
+ = "PATH" '("bin")
+ (list "/tmp"
+ = #+(canonical-package patch)
+ #+(cano= nical-package xz)
+ #+(canonical-package tar)
= + #+python-2
+ #+python))<= br>+
+ (copy-recursively #+ungoogled-source "/tmp/ungoog= led")
+
+ (with-directory-excursion "/tmp/ungoogled"<= br>+
+ (format #t "Unpacking chromium tarball=2E=2E=2E= ~%")
+ (force-output)
+ (invoke "= tar" "xf" #+chromium-source)
+
+ (format #t "Ungoog= lifying=2E=2E=2E~%")
+ (force-output)
+ = (invoke "python3" "run_buildkit_cli=2Epy" "prune"
+ = "-b" "config_bundles/guix" chromium-dir)
+ = (invoke "python3" "run_buildkit_cli=2Epy" "patches" "apply"
+ = "-b" "config_bundles/guix" chromium-dir)
+ = (invoke "python3" "run_buildkit_cli=2Epy" "domains" "apply"
+ = "-b" "config_bundles/linux_rooted"
+ = "-c" "/tmp/domainscache=2Etar=2Egz" chromium-dir)
+
+ = (with-directory-excursion chromium-dir
+ = (format #t "Pruning third party files=2E=2E=2E~%")
+ = (force-output)
+ (apply invoke "python"
+ = "build/linux/unbundle/remove_bundled_libraries= =2Epy"
+ "--do-remove" preserved-files)
+=
+ (format #t "Replacing GN files=2E=2E=2E~%")
+ = (force-output)
+ (invoke "python= 3" "build/linux/unbundle/replace_gn_files=2Epy"
+ = "--system-libraries" "ffmpeg" "flac" "fontconfig"
+ = "freetype" "harfbuzz-ng" "icu" "libdrm" "libevent"
+ = "libjpeg" "libpng" "libvpx" "libwebp" "libxml"
+ = "libxslt" "openh264" "opus" "re2" "snappy" "yas= m"
+ "zlib"))
+
+ (f= ormat #t (string-append "Packing new Ungoogled tarball =2E=2E=2E~%"))
+ = (force-output)
+ (invoke "tar" "cvfa= " #$output
+ ;; Avoid non-determinism in the a= rchive=2E
+ "--mtime=3D@0"
+ = "--owner=3Droot:0"
+ "--group=3Dro= ot:0"
+ "--sort=3Dname"
+ = chromium-dir)
+
+ #t)))))))))
+
+(de= fine opus+custom
+ (package/inherit opus
+ (name "opus+custom")+ (arguments
+ (substitute-keyword-arguments (package-arguments= opus)
+ ((#:configure-flags flags ''())
+ ;; Opus Custo= m is an optional extension of the Opus
+ ;; specification that al= lows for unsupported frame
+ ;; sizes=2E Chromium requires that = this is enabled=2E
+ `(cons "--enable-custom-modes"
+ = ,flags))))))
+
+(define libvpx/chromium
+ ;; Chromium 66 an= d later requires an unreleased libvpx, so we take the
+ ;; commit from = "third_party/libvpx/README=2Echromium" in the tarball=2E
+ (let ((versi= on (package-version libvpx))
+ (commit "e188b5435de71bcd602c378f1= ac0441111f0f915")
+ (revision "0"))
+ (package/inherit libv= px
+ (name "libvpx-chromium")
+ (version (git-version versi= on revision commit))
+ (source (origin
+ (method = git-fetch)
+ (uri (git-reference
+ = (url "https://chromium=2Egooglesource=2Ecom/webm/libvpx")
+ = (commit commit)))
+ (file-name (git-file-name = name version))
+ (sha256
+ (base32
= + "0v7lzvgy45zh7zwzmmzkvbcqmhs4xa97z0h97hd3j6myrxcfz1n9"))= )))))
+
+;; Transitional package until HarfBuzz 2=2E2 is available in= Guix master branch=2E
+(define harfbuzz/chromium
+ (package/inherit= harfbuzz
+ (version "2=2E2=2E0")
+ (source (origin
+ = (inherit (package-source harfbuzz))
+ (uri (string-a= ppend "https://www=2Efreedesktop=2Eorg/software/harfbuzz"
+ = "/release/harfbuzz-" version "=2Etar=2Ebz2"))
+ = (sha256
+ (base32
+ "047q63jr5= 13azf3g1y7f5xn60b4jdjs9zsmrx04sfw5rasyzrk5p"))))))
+
+(define-public = ungoogled-chromium
+ (package
+ (name "ungoogled-chromium")
+ = (version %chromium-version)
+ (synopsis "Graphical web browser")+ (source ungoogled-chromium-source)
+ (build-system gnu-build-s= ystem)
+ (arguments
+ `(#:tests? #f
+ ;; FIXME: There= is a "gn" option specifically for setting -rpath, but
+ ;; it ove= rrides the RUNPATH set by the linker=2E
+ #:validate-runpath? #f+ #:modules ((guix build gnu-build-system)
+ (g= uix build utils)
+ (ice-9 ftw)
+ (i= ce-9 regex)
+ (srfi srfi-26))
+ #:configure-fl= ags
+ ;; See tools/gn/docs/cookbook=2Emd and
+ ;; https:/= /www=2Echromium=2Eorg/developers/gn-build-configuration
+ ;; f= or usage=2E Run "=2E/gn args =2E --list" in the Release
+ ;; dire= ctory for an exhaustive list of supported flags=2E
+ ;; (Note: The= 'configure' phase will do that for you=2E)
+ (list "is_debug=3Dfa= lse"
+ "use_gold=3Dfalse"
+ "use_lld=3Dfalse"=
+ "linux_use_bundled_binutils=3Dfalse"
+ "us= e_custom_libcxx=3Dfalse"
+ "use_sysroot=3Dfalse"
+ = "enable_precompiled_headers=3Dfalse"
+ "goma_dir=3D\"\= ""
+ "enable_nacl=3Dfalse"
+ "enable_nacl_non= sfi=3Dfalse"
+ "use_allocator=3D\"none\"" ;don't use tcmal= loc
+ "use_unofficial_version_number=3Dfalse"
+
+ = ;; Define a custom toolchain that simply looks up CC, AR and
+ = ;; friends from the environment=2E
+ "custom_tool= chain=3D\"//build/toolchain/linux/unbundle:default\""
+ "hos= t_toolchain=3D\"//build/toolchain/linux/unbundle:default\""
+
+ = ;; Don't assume it's clang=2E
+ "is_clang=3Dfalse"+
+ ;; Optimize for building everything at once, as opposed= to
+ ;; incrementally for development=2E See "docs/jumbo= =2Emd"=2E
+ "use_jumbo_build=3Dtrue"
+
+ ;= ; Disable type-checking for the Web UI to avoid a Java dependency=2E
+ = "closure_compile=3Dfalse"
+
+ ;; Disable debug= ging features to save space=2E
+ "blink_symbol_level=3D0"+ "enable_iterator_debugging=3Dfalse"
+
+ ;;= Some of the unbundled libraries throws deprecation
+ ;; war= nings, etc=2E Ignore it=2E
+ "treat_warnings_as_errors=3Dfa= lse"
+
+ ;; Don't add any API keys=2E End users can set = them in the
+ ;; environment if desired=2E See
+ = ;; <https://www=2Echromium=2Eorg/developers/how-tos/api-keys>=2E+ "use_official_google_api_keys=3Dfalse"
+
+ = ;; Disable "safe browsing", which pulls in a dependency on
+ = ;; the nonfree "unrar" program (as of m66)=2E
+ "safe_bro= wsing_mode=3D0"
+
+ ;; Disable "field trials"=2E
+ = "fieldtrial_testing_like_official_build=3Dtrue"
+
+ = ;; Ungoogled components=2E
+ "enable_mdns=3Dfalse"
+ = "enable_one_click_signin=3Dfalse"
+ "enable_read= ing_list=3Dfalse"
+ "enable_remoting=3Dfalse"
+ = "enable_reporting=3Dfalse"
+ "enable_service_discovery=3D= false"
+ "enable_swiftshader=3Dfalse"
+ "use_= vaapi=3Dtrue"
+
+ ;; Use system libraries where possible= =2E
+ "use_system_freetype=3Dtrue"
+ "use_sys= tem_harfbuzz=3Dtrue"
+ "use_system_lcms2=3Dtrue"
+ = "use_system_libdrm=3Dtrue"
+ "use_system_libjpeg=3Dtru= e"
+ "use_system_libpng=3Dtrue"
+ ;;"use_syst= em_libsync=3Dtrue"
+ "use_system_zlib=3Dtrue"
+
+ = "use_gnome_keyring=3Dfalse" ;deprecated by libsecret
+ = "use_openh264=3Dtrue"
+ "use_pulseaudio=3Dtrue"
+ = "link_pulseaudio=3Dtrue"
+
+ ;; Don't arbitraril= y restrict formats supported by system ffmpeg=2E
+ "propriet= ary_codecs=3Dtrue"
+ "ffmpeg_branding=3D\"Chrome\""
+
= + ;; WebRTC stuff=2E
+ "rtc_use_h264=3Dtrue"
= + ;; Don't use bundled sources=2E
+ "rtc_build_j= son=3Dfalse"
+ "rtc_build_libevent=3Dfalse"
+ = "rtc_build_libvpx=3Dfalse"
+ "rtc_build_opus=3Dfalse"
+ = "rtc_build_ssl=3Dfalse"
+
+ "rtc_build_libsrt= p=3Dtrue" ;FIXME: fails to find headers
+ "rtc_build_usrsc= tp=3Dtrue" ;TODO: package this
+ (string-append "rtc_jsonc= pp_root=3D\""
+ (assoc-ref %build-inputs "jso= ncpp")
+ "/include/jsoncpp/json\"")
+ = (string-append "rtc_ssl_root=3D\""
+ = (assoc-ref %build-inputs "openssl")
+ "/inclu= de/openssl\""))
+ #:phases
+ (modify-phases %standard-pha= ses
+ (add-after 'unpack 'patch-stuff
+ (lambda* (#= :key inputs #:allow-other-keys)
+ (substitute* "printing/cup= s_config_helper=2Epy"
+ (("cups_config =3D=2E*")
+ = (string-append "cups_config =3D '" (assoc-ref inputs "cups")
= + "/bin/cups-config'\n")))
+
+ = (substitute*
+ '("base/process/launch_posix=2Ecc"+ "base/third_party/dynamic_annotations/dynamic_annotati= ons=2Ec"
+ "sandbox/linux/seccomp-bpf/sandbox_bpf=2Ecc= "
+ "sandbox/linux/services/credentials=2Ecc"
+ = "sandbox/linux/services/namespace_utils=2Ecc"
+ = "sandbox/linux/services/syscall_wrappers=2Ecc"
+ = "sandbox/linux/syscall_broker/broker_host=2Ecc")
+ (("= include \"base/third_party/valgrind/") "include \"valgrind/"))
+
+ = (for-each (lambda (file)
+ (substitute= * file
+ ;; Fix opus include path=2E
+ = ;; Do not substitute opus_private=2Eh=2E
+ = (("#include \"opus\\=2Eh\"")
+ = "#include \"opus/opus=2Eh\"")
+ (("#inclu= de \"opus_custom\\=2Eh\"")
+ "#include \"opus= /opus_custom=2Eh\"")
+ (("#include \"opus_defi= nes\\=2Eh\"")
+ "#include \"opus/opus_defines= =2Eh\"")
+ (("#include \"opus_multistream\\=2E= h\"")
+ "#include \"opus/opus_multistream=2Eh= \"")
+ (("#include \"opus_types\\=2Eh\"")
+= "#include \"opus/opus_types=2Eh\"")))
+ = (find-files (string-append "third_party/webrtc/modules"+ "/audio_coding/codecs/= opus")))
+
+ (substitute* "chrome/common/chrome_paths=2Ec= c"
+ (("/usr/share/chromium/extensions")
+ = ;; TODO: Add ~/=2Eguix-profile=2E
+ "/run/current-syst= em/profile/share/chromium/extensions"))
+
+ ;; XXX: Shoul= d be unnecessary when use_system_lcms2=3Dtrue=2E
+ (substitu= te* "third_party/pdfium/core/fxcodec/codec/ccodec_iccmodule=2Eh"
+ = (("include \"third_party/lcms/include/lcms2\\=2Eh\"")
+ = "include \"lcms2=2Eh\""))
+
+ (substitute*
+ = "third_party/breakpad/breakpad/src/common/linux/libcurl_wrap= per=2Eh"
+ (("include \"third_party/curl") "include \"curl= "))
+
+ (substitute* "third_party/webrtc/rtc_base/strings= /json=2Eh"
+ (("#include \"third_party/jsoncpp/") "#includ= e \"json/"))
+
+ (substitute* "media/base/decode_capabili= ties=2Ecc"
+ (("third_party/libvpx/source/libvpx/") ""))+
+ (substitute* "ui/gfx/skia_util=2Eh"
+ = (("third_party/vulkan/include/") ""))
+
+ ;; Building ch= romedriver embeds some files using the ZIP
+ ;; format which= doesn't support timestamps before
+ ;; 1980=2E Therefore, a= dvance the timestamps of the files
+ ;; which are included s= o that building chromedriver
+ ;; works=2E
+ = (let ((circa-1980 (* 10 366 24 60 60)))
+ (for-each (lambd= a (file)
+ (utime file circa-1980 circa-1980))=
+ '("chrome/test/chromedriver/extension/backgro= und=2Ejs"
+ "chrome/test/chromedriver/extensio= n/manifest=2Ejson")))
+
+ #t))
+ (add-before '= configure 'prepare-build-environment
+ (lambda* (#:key inputs = #:allow-other-keys)
+
+ ;; Make sure the right build tool= s are used=2E
+ (setenv "AR" "ar") (setenv "NM" "nm")
+ = (setenv "CC" "gcc") (setenv "CXX" "g++")
+
+ ;= ; Work around <https://bugs= =2Egnu=2Eorg/30756>=2E
+ (unsetenv "C_INCLUDE_PATH")<= br>+ (unsetenv "CPLUS_INCLUDE_PATH")
+
+ ;; T= ODO: pre-compile instead=2E Avoids a race condition=2E
+ (se= tenv "PYTHONDONTWRITEBYTECODE" "1")
+
+ ;; XXX: How porta= ble is this=2E
+ (mkdir-p "third_party/node/linux/node-linux= -x64")
+ (symlink (string-append (assoc-ref inputs "node") "= /bin")
+ "third_party/node/linux/node-linux-x64/bin= ")
+
+ #t))
+ (replace 'configure
+ = (lambda* (#:key configure-flags #:allow-other-keys)
+ (le= t ((args (string-join configure-flags " ")))
+ ;; Generate= ninja build files=2E
+ (invoke "gn" "gen" "out/Release"+ (string-append "--args=3D" args))
+
+ = ;; Print the full list of supported arguments as well as
+ = ;; their current status for convenience=2E
+ (fo= rmat #t "Dumping configure flags=2E=2E=2E\n")
+ (invoke "g= n" "args" "out/Release" "--list"))))
+ (replace 'build
+ = (lambda* (#:key outputs #:allow-other-keys)
+ (invoke = "ninja" "-C" "out/Release"
+ "-j" (number->string= (parallel-job-count))
+ "chrome"
+ = "chromedriver")))
+ (replace 'install
+ (lam= bda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out= (assoc-ref outputs "out"))
+ (bin = (string-append out "/bin"))
+ (exe (st= ring-append bin "/chromium"))
+ (lib (stri= ng-append out "/lib"))
+ (man (string-appe= nd out "/share/man/man1"))
+ (applications (string-= append out "/share/applications"))
+ (install-regexp = (make-regexp "\\=2E(bin|pak)$"))
+ (locales (s= tring-append lib "/locales"))
+ (resources (stri= ng-append lib "/resources"))
+ (preferences (assoc= -ref inputs "master-preferences"))
+ (gtk+ = (assoc-ref inputs "gtk+"))
+ (mesa (assoc-r= ef inputs "mesa"))
+ (nss (assoc-ref input= s "nss"))
+ (udev (assoc-ref inputs "udev")= )
+ (sh (which "sh")))
+
+ = (substitute* '("chrome/app/resources/manpage=2E1=2Ein"
+ = "chrome/installer/linux/common/desktop=2Etemplate")
= + (("@@MENUNAME@@") "Chromium")
+ (("@@P= ACKAGE@@") "chromium")
+ (("/usr/bin/@@USR_BIN_SYMLINK_N= AME@@") exe))
+
+ (mkdir-p man)
+ (cop= y-file "chrome/app/resources/manpage=2E1=2Ein"
+ = (string-append man "/chromium=2E1"))
+
+ (mkdir-p app= lications)
+ (copy-file "chrome/installer/linux/common/des= ktop=2Etemplate"
+ (string-append applications = "/chromium=2Edesktop"))
+
+ (mkdir-p lib)
+ = (copy-file preferences (string-append lib "/master_preferences"))
= +
+ (with-directory-excursion "out/Release"
+ = (for-each (lambda (file)
+ (install-f= ile file lib))
+ (scandir "=2E" (cut regexp-ex= ec install-regexp <>)))
+ (copy-file "chrome" (str= ing-append lib "/chromium"))
+
+ ;; TODO: Install ico= ns from "=2E=2E/=2E=2E/chrome/app/themes" into
+ ;; "out= /share/icons/hicolor/$size"=2E
+ (install-file
+ = "product_logo_48=2Epng"
+ (string-append o= ut "/share/icons/48x48/chromium=2Epng"))
+
+ (copy-re= cursively "locales" locales)
+ (copy-recursively "resour= ces" resources)
+
+ (mkdir-p bin)
+ = (symlink "=2E=2E/lib/chromium" exe)
+ (install-file "c= hromedriver" bin)
+
+ (wrap-program exe
+ = ;; TODO: Get these in RUNPATH=2E
+ `("LD_LIB= RARY_PATH" ":" prefix
+ (,(string-append lib ":" nss= "/lib/nss:" gtk+ "/lib:"
+ mesa "/= lib:" udev "/lib")))
+ ;; Avoid file manager crash=2E = See <https://bugs=2Egnu=2Eor= g/26593>=2E
+ `("XDG_DATA_DIRS" ":" prefix (,(s= tring-append gtk+ "/share"))))
+ #t)))))))
+ (nati= ve-inputs
+ `(("bison" ,bison)
+ ("gcc" ,gcc-8)
+ = ("gn" ,gn)
+ ("gperf" ,gperf)
+ ("ninja" ,ninja)
+ = ("node" ,node)
+ ("pkg-config" ,pkg-config)
+ ("which"= ,which)
+ ("yasm" ,yasm)
+
+ ;; This file contains de= faults for new user profiles=2E
+ ("master-preferences" ,(local-fi= le "aux-files/chromium/master-preferences=2Ejson"))
+
+ ("pytho= n-beautifulsoup4" ,python2-beautifulsoup4)
+ ("python-html5lib" ,p= ython2-html5lib)
+ ("python" ,python-2)))
+ (inputs
+ = `(("alsa-lib" ,alsa-lib)
+ ("atk" ,atk)
+ ("cups" ,cups)=
+ ("curl" ,curl)
+ ("dbus" ,dbus)
+ ("dbus-glib= " ,dbus-glib)
+ ("expat" ,expat)
+ ("flac" ,flac)
+ = ("ffmpeg" ,ffmpeg)
+ ("fontconfig" ,fontconfig)
+ ("f= reetype" ,freetype)
+ ("gdk-pixbuf" ,gdk-pixbuf)
+ ("glib= " ,glib)
+ ("gtk+" ,gtk+)
+ ("harfbuzz" ,harfbuzz/chromiu= m)
+ ("icu4c" ,icu4c)
+ ("jsoncpp" ,jsoncpp)
+ (= "lcms" ,lcms)
+ ("libevent" ,libevent)
+ ("libffi" ,libff= i)
+ ("libjpeg-turbo" ,libjpeg-turbo)
+ ("libpng" ,libpng= )
+ ("libva" ,libva)
+ ("libvpx" ,libvpx/chromium)
+ = ("libwebp" ,libwebp)
+ ("libx11" ,libx11)
+ ("libxcb= " ,libxcb)
+ ("libxcomposite" ,libxcomposite)
+ ("libxcur= sor" ,libxcursor)
+ ("libxdamage" ,libxdamage)
+ ("libxex= t" ,libxext)
+ ("libxfixes" ,libxfixes)
+ ("libxi" ,libxi= )
+ ("libxml2" ,libxml2)
+ ("libxrandr" ,libxrandr)
+ = ("libxrender" ,libxrender)
+ ("libxscrnsaver" ,libxscrnsaver= )
+ ("libxslt" ,libxslt)
+ ("libxtst" ,libxtst)
+ = ("mesa" ,mesa)
+ ("minizip" ,minizip)
+ ("mit-krb5" ,mi= t-krb5)
+ ("nss" ,nss)
+ ("openh264" ,openh264)
+ = ("openjpeg" ,openjpeg) ;PDFium only
+ (= "openssl" ,openssl)
+ ("opus" ,opus+custom)
+ ("pango" ,p= ango)
+ ("pciutils" ,pciutils)
+ ("pulseaudio" ,pulseaudi= o)
+ ("re2" ,re2)
+ ("snappy" ,snappy)
+ ("speec= h-dispatcher" ,speech-dispatcher)
+ ("udev" ,eudev)
+ ("v= algrind" ,valgrind)
+ ("vulkan-headers" ,vulkan-headers)))
+ = (home-page "https://www=2Echromium=2Eorg/")
+ (description
+ = "Ungoogled-Chromium is the Chromium web browser, sans integration with
+= Google web services=2E")
+ ;; Chromium is developed as BSD-3, but bun= dles a large number of third-party
+ ;; components with other license= s=2E For full information, see chrome://credits=2E
+ (license (list = license:bsd-3
+ license:bsd-2
+ l= icense:expat
+ license:asl2=2E0
+ = license:mpl1=2E1
+ license:mpl2=2E0
+ = license:public-domain
+ license:isc
+ = (license:non-copyleft "chrome://credits"
+ = "See chrome://credits for more information=2E")
+ = license:lgpl2=2E1+))))

Wow=2E
Nice work! =F0=9F=98=83
--
Sent from my k-9 mail= for Android=2E
------OLEBV8UXLOH3TYKFR6Q74PQLQ3834I--