| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 |
|
| 24 | (define-module (gnu packages chromium)
|
| 25 | #:use-module ((guix licenses) #:prefix license:)
|
| 26 | #:use-module (guix packages)
|
| 27 | #:use-module (guix gexp)
|
| 28 | #:use-module (guix download)
|
| 29 | #:use-module (guix git-download)
|
| 30 | #:use-module (guix utils)
|
| 31 | #:use-module (guix build-system gnu)
|
| 32 | #:use-module (guix build-system trivial)
|
| 33 | #:use-module (gnu packages)
|
| 34 | #:use-module (gnu packages base)
|
| 35 | #:use-module (gnu packages bash)
|
| 36 | #:use-module (gnu packages bison)
|
| 37 | #:use-module (gnu packages build-tools)
|
| 38 | #:use-module (gnu packages compression)
|
| 39 | #:use-module (gnu packages crypto)
|
| 40 | #:use-module (gnu packages cups)
|
| 41 | #:use-module (gnu packages curl)
|
| 42 | #:use-module (gnu packages fontutils)
|
| 43 | #:use-module (gnu packages freedesktop)
|
| 44 | #:use-module (gnu packages ghostscript)
|
| 45 | #:use-module (gnu packages gl)
|
| 46 | #:use-module (gnu packages glib)
|
| 47 | #:use-module (gnu packages gnome)
|
| 48 | #:use-module (gnu packages gperf)
|
| 49 | #:use-module (gnu packages golang)
|
| 50 | #:use-module (gnu packages gtk)
|
| 51 | #:use-module (gnu packages icu4c)
|
| 52 | #:use-module (gnu packages image)
|
| 53 | #:use-module (gnu packages libffi)
|
| 54 | #:use-module (gnu packages linux)
|
| 55 | #:use-module (gnu packages llvm)
|
| 56 | #:use-module (gnu packages kerberos)
|
| 57 | #:use-module (gnu packages maths)
|
| 58 | #:use-module (gnu packages node)
|
| 59 | #:use-module (gnu packages nss)
|
| 60 | #:use-module (gnu packages pciutils)
|
| 61 | #:use-module (gnu packages pkg-config)
|
| 62 | #:use-module (gnu packages pulseaudio)
|
| 63 | #:use-module (gnu packages python)
|
| 64 | #:use-module (gnu packages python-web)
|
| 65 | #:use-module (gnu packages python-xyz)
|
| 66 | #:use-module (gnu packages qt)
|
| 67 | #:use-module (gnu packages rust)
|
| 68 | #:use-module (gnu packages rust-apps)
|
| 69 | #:use-module (gnu packages serialization)
|
| 70 | #:use-module (gnu packages speech)
|
| 71 | #:use-module (gnu packages valgrind)
|
| 72 | #:use-module (gnu packages vulkan)
|
| 73 | #:use-module (gnu packages video)
|
| 74 | #:use-module (gnu packages xdisorg)
|
| 75 | #:use-module (gnu packages xiph)
|
| 76 | #:use-module (gnu packages xml)
|
| 77 | #:use-module (gnu packages xorg)
|
| 78 | #:use-module (ice-9 match))
|
| 79 |
|
| 80 | (define %preserved-third-party-files
|
| 81 | '("base/third_party/cityhash" |
| 82 | "base/third_party/double_conversion" |
| 83 | "base/third_party/icu" |
| 84 | "base/third_party/superfasthash" |
| 85 | "base/third_party/symbolize" |
| 86 | "base/third_party/xdg_user_dirs" |
| 87 | "net/third_party/mozilla_security_manager" |
| 88 | "net/third_party/quiche" |
| 89 | "net/third_party/uri_template" |
| 90 | "third_party/abseil-cpp" |
| 91 | "third_party/angle" |
| 92 | "third_party/angle/src/common/third_party/xxhash" |
| 93 | "third_party/angle/src/third_party/ceval" |
| 94 | "third_party/angle/src/third_party/libXNVCtrl" |
| 95 | "third_party/angle/src/third_party/volk" |
| 96 | "third_party/anonymous_tokens" |
| 97 | "third_party/apple_apsl" |
| 98 | "third_party/axe-core" |
| 99 | "third_party/bidimapper" |
| 100 | "third_party/blink" |
| 101 | "third_party/boringssl" |
| 102 | "third_party/boringssl/src/third_party/fiat" |
| 103 | "third_party/breakpad" |
| 104 | "third_party/catapult" |
| 105 | "third_party/catapult/common/py_vulcanize/third_party/rcssmin" |
| 106 | "third_party/catapult/common/py_vulcanize/third_party/rjsmin" |
| 107 | "third_party/catapult/third_party/beautifulsoup4-4.9.3" |
| 108 | "third_party/catapult/third_party/html5lib-1.1" |
| 109 | "third_party/catapult/third_party/polymer" |
| 110 | "third_party/catapult/third_party/six" |
| 111 | "third_party/catapult/third_party/typ" |
| 112 | |
| 113 | "third_party/catapult/tracing/third_party/d3" |
| 114 | "third_party/catapult/tracing/third_party/gl-matrix" |
| 115 | "third_party/catapult/tracing/third_party/jpeg-js" |
| 116 | |
| 117 | "third_party/catapult/tracing/third_party/jszip" |
| 118 | "third_party/catapult/tracing/third_party/mannwhitneyu" |
| 119 | "third_party/catapult/tracing/third_party/oboe" |
| 120 | |
| 121 | "third_party/catapult/tracing/third_party/pako" |
| 122 | "third_party/ced" |
| 123 | "third_party/cld_3" |
| 124 | "third_party/closure_compiler" |
| 125 | "third_party/compiler-rt" |
| 126 | "third_party/content_analysis_sdk" |
| 127 | "third_party/cpuinfo" |
| 128 | "third_party/crabbyavif" |
| 129 | "third_party/crashpad" |
| 130 | "third_party/crashpad/crashpad/third_party/lss" |
| 131 | "third_party/crashpad/crashpad/third_party/zlib" |
| 132 | "third_party/cros_system_api" |
| 133 | "third_party/dawn" |
| 134 | |
| 135 | "third_party/dawn/third_party/EGL-Registry/src/sdk" |
| 136 | "third_party/dawn/third_party/OpenGL-Registry" |
| 137 | "third_party/dawn/third_party/gn/webgpu-cts" |
| 138 | "third_party/dawn/third_party/renderdoc" |
| 139 | "third_party/dawn/third_party/webgpu-headers" |
| 140 | "third_party/depot_tools" |
| 141 | "third_party/devscripts" |
| 142 | "third_party/devtools-frontend" |
| 143 | "third_party/devtools-frontend/src/front_end"
|
| 144 | "third_party/devtools-frontend/src/front_end/third_party"
|
| 145 | "third_party/devtools-frontend/src/front_end/third_party/acorn" |
| 146 | "third_party/devtools-frontend/src/front_end/third_party\
|
| 147 | /additional_readme_paths.json" |
| 148 | "third_party/devtools-frontend/src/front_end/third_party/axe-core" |
| 149 | "third_party/devtools-frontend/src/front_end/third_party/chromium" |
| 150 | "third_party/devtools-frontend/src/front_end/third_party/codemirror" |
| 151 | "third_party/devtools-frontend/src/front_end/third_party/csp_evaluator" |
| 152 | "third_party/devtools-frontend/src/front_end/third_party/diff" |
| 153 | "third_party/devtools-frontend/src/front_end/third_party/i18n" |
| 154 | "third_party/devtools-frontend/src/front_end/third_party/intl-messageformat" |
| 155 | "third_party/devtools-frontend/src/front_end/third_party/json5" |
| 156 | "third_party/devtools-frontend/src/front_end/third_party/legacy-javascript" |
| 157 | "third_party/devtools-frontend/src/front_end/third_party/lighthouse" |
| 158 | "third_party/devtools-frontend/src/front_end/third_party/lit" |
| 159 | "third_party/devtools-frontend/src/front_end/third_party/marked" |
| 160 | "third_party/devtools-frontend/src/front_end/third_party/puppeteer" |
| 161 | "third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/third_party"
|
| 162 | "third_party/devtools-frontend/src/front_end/third_party/puppeteer\
|
| 163 | /package/lib/third_party/mitt" |
| 164 | "third_party/devtools-frontend/src/front_end/third_party/puppeteer/third_party/mitt" |
| 165 | "third_party/devtools-frontend/src/front_end/third_party/puppeteer/third_party/parsel" |
| 166 | "third_party/devtools-frontend/src/front_end/third_party/puppeteer/third_party/rxjs" |
| 167 | "third_party/devtools-frontend/src/front_end/third_party/puppeteer-replay" |
| 168 | "third_party/devtools-frontend/src/front_end/third_party/source-map-scopes-codec" |
| 169 | "third_party/devtools-frontend/src/front_end/third_party\
|
| 170 | /vscode.web-custom-data" |
| 171 | "third_party/devtools-frontend/src/front_end/third_party/third-party-web" |
| 172 | "third_party/devtools-frontend/src/front_end/third_party/wasmparser" |
| 173 | "third_party/devtools-frontend/src/front_end/third_party/web-vitals" |
| 174 | "third_party/devtools-frontend/src/third_party/i18n" |
| 175 | "third_party/devtools-frontend/src/third_party/pyjson5" |
| 176 |
|
| 177 | "third_party/dom_distiller_js" |
| 178 | "third_party/dragonbox" |
| 179 | "third_party/d3" |
| 180 | "third_party/eigen3" |
| 181 | "third_party/emoji-segmenter" |
| 182 | "third_party/farmhash" |
| 183 | "third_party/fast_float" |
| 184 | "third_party/fdlibm" |
| 185 | "third_party/federated_compute/chromium/fcp/confidentialcompute" |
| 186 | "third_party/federated_compute/chromium/fcp/protos" |
| 187 | |
| 188 | "third_party/federated_compute/chromium/fcp/protos/confidentialcompute"
|
| 189 | "third_party/federated_compute/chromium/fcp/secagg" |
| 190 | "third_party/federated_compute/chromium/fcp/client" |
| 191 | "third_party/federated_compute/src/fcp/base" |
| 192 | "third_party/federated_compute/src/fcp/confidentialcompute" |
| 193 | "third_party/federated_compute/src/fcp/client" |
| 194 | "third_party/federated_compute/src/fcp/protos" |
| 195 | "third_party/federated_compute/src/fcp/protos/confidentialcompute" |
| 196 | "third_party/federated_compute/src/fcp/protos/federatedcompute" |
| 197 | "third_party/federated_compute/src/fcp/secagg" |
| 198 | "third_party/federated_compute/third_party/googleapis/src/google/rpc" |
| 199 | |
| 200 | "third_party/federated_compute/third_party/googleapis/src/google/longrunning"
|
| 201 | "third_party/federated_compute/third_party/googleapis/src/google/type" |
| 202 | "third_party/federated_compute/third_party/protodatastore-cpp" |
| 203 | |
| 204 | "third_party/federated_compute/third_party/tensorflow-federated/src/tensorflow_federated"
|
| 205 | "third_party/ffmpeg" |
| 206 | "third_party/fft2d" |
| 207 | "third_party/flatbuffers" |
| 208 | "third_party/fp16" |
| 209 | "third_party/freetype" |
| 210 | "third_party/fusejs" |
| 211 | "third_party/fxdiv" |
| 212 | "third_party/gemmlowp" |
| 213 | "third_party/google_input_tools" |
| 214 | "third_party/google_input_tools/third_party/closure_library" |
| 215 | "third_party/google_input_tools/third_party/closure_library/third_party/closure" |
| 216 | "third_party/googletest" |
| 217 | "third_party/harfbuzz" |
| 218 | "third_party/highway" |
| 219 | "third_party/hunspell" |
| 220 | "third_party/hyphenation-patterns" |
| 221 | |
| 222 | "third_party/icu" |
| 223 | "third_party/ink" |
| 224 | "third_party/inspector_protocol" |
| 225 | "third_party/ipcz" |
| 226 | "third_party/jinja2" |
| 227 | "third_party/jsoncpp" |
| 228 | "third_party/khronos" |
| 229 | "third_party/lens_server_proto" |
| 230 | "third_party/leveldatabase" |
| 231 | "third_party/libaddressinput" |
| 232 | "third_party/libaom" |
| 233 | "third_party/libaom/source/libaom/third_party/fastfeat" |
| 234 | "third_party/libaom/source/libaom/third_party/vector" |
| 235 | "third_party/libaom/source/libaom/third_party/x86inc" |
| 236 | "third_party/libgav1" |
| 237 | "third_party/libjingle_xmpp" |
| 238 | "third_party/libpfm4" |
| 239 | "third_party/libpng" |
| 240 | "third_party/libphonenumber" |
| 241 | "third_party/libsecret" |
| 242 | "third_party/libsrtp" |
| 243 | "third_party/libsync" |
| 244 | "third_party/libtess2" |
| 245 | "third_party/liburlpattern" |
| 246 | "third_party/libva_protected_content" |
| 247 |
|
| 248 | |
| 249 | "third_party/libvpx" |
| 250 | "third_party/libvpx/source/libvpx/third_party/x86inc" |
| 251 |
|
| 252 | "third_party/libwebm" |
| 253 | "third_party/libx11" |
| 254 | "third_party/libxcb-keysyms" |
| 255 | "third_party/libxml/chromium" |
| 256 | "third_party/libyuv" |
| 257 | "third_party/libzip" |
| 258 | "third_party/lit" |
| 259 | "third_party/lit/v3_0" |
| 260 | "third_party/lottie" |
| 261 | "third_party/lss" |
| 262 | "third_party/lzma_sdk" |
| 263 | "third_party/mako" |
| 264 | "third_party/markupsafe" |
| 265 | "third_party/material_color_utilities" |
| 266 | "third_party/metrics_proto" |
| 267 | "third_party/minigbm" |
| 268 | "third_party/ml_dtypes" |
| 269 | "third_party/modp_b64" |
| 270 | "third_party/nasm" |
| 271 | "third_party/nearby" |
| 272 | "third_party/neon_2_sse" |
| 273 | "third_party/node" |
| 274 | "third_party/oak/chromium/proto" |
| 275 | "third_party/oak/chromium/proto/attestation" |
| 276 | "third_party/omnibox_proto" |
| 277 | "third_party/one_euro_filter" |
| 278 | "third_party/openscreen" |
| 279 | "third_party/openscreen/src/third_party/tinycbor" |
| 280 | "third_party/opus" |
| 281 | "third_party/ots" |
| 282 | "third_party/pdfium" |
| 283 | "third_party/pdfium/third_party/agg23" |
| 284 | "third_party/pdfium/third_party/bigint" |
| 285 | "third_party/pdfium/third_party/lcms" |
| 286 | "third_party/pdfium/third_party/libopenjpeg" |
| 287 | "third_party/pdfium/third_party/libtiff" |
| 288 | "third_party/pdfium/third_party/freetype/include/pstables.h" |
| 289 | "third_party/perfetto" |
| 290 | "third_party/perfetto/protos/third_party/android" |
| 291 | "third_party/perfetto/protos/third_party/chromium" |
| 292 | "third_party/perfetto/protos/third_party/pprof" |
| 293 | "third_party/perfetto/protos/third_party/primes" |
| 294 | "third_party/perfetto/protos/third_party/simpleperf" |
| 295 | "third_party/pffft" |
| 296 | "third_party/ply" |
| 297 | "third_party/polymer" |
| 298 | "third_party/private_membership" |
| 299 | "third_party/private-join-and-compute" |
| 300 | "third_party/protobuf" |
| 301 | "third_party/protobuf/third_party/utf8_range" |
| 302 | "third_party/pthreadpool" |
| 303 | "third_party/puffin" |
| 304 | "third_party/pyyaml" |
| 305 | "third_party/pyjson5" |
| 306 | "third_party/rapidhash" |
| 307 | "third_party/readability" |
| 308 | "third_party/re2" |
| 309 | "third_party/rnnoise" |
| 310 | "third_party/rust" |
| 311 | "third_party/ruy" |
| 312 | "third_party/s2cellid" |
| 313 | "third_party/search_engines_data" |
| 314 | "third_party/securemessage" |
| 315 | "third_party/selenium-atoms" |
| 316 | "third_party/sentencepiece" |
| 317 | "third_party/sentencepiece/src/third_party/darts_clone" |
| 318 | "third_party/shell-encryption" |
| 319 | "third_party/simdutf" |
| 320 | "third_party/simplejson" |
| 321 | "third_party/six" |
| 322 | "third_party/skia" |
| 323 | "third_party/skia/include/third_party/vulkan" |
| 324 | "third_party/smhasher" |
| 325 |
|
| 326 | |
| 327 | |
| 328 | "third_party/snappy" |
| 329 |
|
| 330 | "third_party/speech-dispatcher" |
| 331 | "third_party/spirv-headers" |
| 332 | "third_party/spirv-tools" |
| 333 | "third_party/sqlite" |
| 334 | "third_party/swiftshader" |
| 335 | "third_party/swiftshader/third_party/astc-encoder" |
| 336 | "third_party/swiftshader/third_party/llvm-10.0" |
| 337 | "third_party/swiftshader/third_party/llvm-subzero" |
| 338 | "third_party/swiftshader/third_party/marl" |
| 339 | "third_party/swiftshader/third_party/subzero" |
| 340 | "third_party/swiftshader/third_party/SPIRV-Headers" |
| 341 | "third_party/swiftshader/third_party/SPIRV-Tools" |
| 342 | "third_party/tensorflow-text" |
| 343 | "third_party/tensorflow_models" |
| 344 | "third_party/tflite" |
| 345 | "third_party/tflite/src/third_party/fft2d" |
| 346 | "third_party/tflite/src/third_party/xla" |
| 347 | "third_party/tflite/src/third_party/xla/xla" |
| 348 | "third_party/tflite/src/third_party/xla/xla/tsl/framework" |
| 349 | "third_party/tflite/src/third_party/xla/xla/tsl/lib/random" |
| 350 | "third_party/tflite/src/third_party/xla/xla/tsl/platform" |
| 351 | "third_party/tflite/src/third_party/xla/xla/tsl/protobuf" |
| 352 | "third_party/tflite/src/third_party/xla/xla/tsl/util" |
| 353 | "third_party/tflite/src/third_party/xla/third_party/tsl" |
| 354 | "third_party/tflite/src/third_party/xla/third_party/tsl/tsl" |
| 355 | "third_party/tflite/src/third_party/xla/third_party/tsl/tsl/platform" |
| 356 | "third_party/tflite/src/third_party/xla/third_party/tsl/tsl/profiler" |
| 357 | "third_party/ukey2" |
| 358 | "third_party/ungoogled-chromium" |
| 359 | "third_party/usb_ids" |
| 360 | "third_party/utf" |
| 361 | "third_party/vulkan-deps" |
| 362 | "third_party/vulkan-headers" |
| 363 | "third_party/vulkan-loader" |
| 364 | "third_party/vulkan_memory_allocator" |
| 365 | "third_party/vulkan-tools" |
| 366 | "third_party/vulkan-validation-layers" |
| 367 | "third_party/vulkan-utility-libraries" |
| 368 | "third_party/wayland" |
| 369 | "third_party/wayland-protocols" |
| 370 | "third_party/webdriver" |
| 371 | "third_party/webgpu-cts" |
| 372 | "third_party/webrtc" |
| 373 | "third_party/webrtc/common_audio/third_party/ooura" |
| 374 | "third_party/webrtc/common_audio/third_party/spl_sqrt_floor" |
| 375 | "third_party/webrtc/modules/third_party/fft" |
| 376 | "third_party/webrtc/modules/third_party/g711" |
| 377 | "third_party/webrtc/modules/third_party/g722" |
| 378 | "third_party/widevine/cdm/widevine_cdm_common.h" |
| 379 | "third_party/woff2" |
| 380 | "third_party/wuffs" |
| 381 | "third_party/xcbproto" |
| 382 | "third_party/xnnpack" |
| 383 |
|
| 384 | |
| 385 | "third_party/libxcb-keysyms" |
| 386 | "third_party/libx11/src/KeyBind.c" |
| 387 | "third_party/libx11/src/xkb/XKBBind.c" |
| 388 | "third_party/x11proto/keysymdef.h" |
| 389 |
|
| 390 | "third_party/zlib/google" |
| 391 | "third_party/zxcvbn-cpp" |
| 392 | "url/third_party/mozilla" |
| 393 | "v8/third_party/glibc/src/sysdeps/ieee754/dbl-64" |
| 394 | "v8/third_party/inspector_protocol" |
| 395 | "v8/third_party/rapidhash-v8" |
| 396 | "v8/third_party/siphash" |
| 397 | "v8/third_party/utf8-decoder" |
| 398 | "v8/third_party/valgrind" |
| 399 | "v8/third_party/v8/builtins" |
| 400 | "v8/third_party/v8/codegen" |
| 401 | ))
|
| 402 |
|
| 403 | (define %denied-files
|
| 404 | |
| 405 | |
| 406 | |
| 407 | '("third_party/blink/perf_tests"))
|
| 408 |
|
| 409 | (define %chromium-version "151.0.7922.137")
|
| 410 | (define %ungoogled-revision (string-append %chromium-version "-1"))
|
| 411 | (define %debian-revision (string-append "debian/" %ungoogled-revision))
|
| 412 |
|
| 413 | (define %ungoogled-origin
|
| 414 | (origin
|
| 415 | (method git-fetch)
|
| 416 | (uri (git-reference (url "https://github.com/ungoogled-software/ungoogled-chromium")
|
| 417 | (commit %ungoogled-revision)))
|
| 418 | (file-name (git-file-name "ungoogled-chromium" %ungoogled-revision))
|
| 419 | (sha256
|
| 420 | (base32
|
| 421 | "03kia9fj40hlvvnz1v1gbzbhicfh5zj2f0am7yv3va4mmd3232a0"))))
|
| 422 |
|
| 423 | (define %debian-origin
|
| 424 | (origin
|
| 425 | (method git-fetch)
|
| 426 | (uri (git-reference
|
| 427 | (url "https://salsa.debian.org/chromium-team/chromium.git")
|
| 428 | (commit %debian-revision)))
|
| 429 | (file-name (git-file-name "debian-chromium-patches"
|
| 430 | (match (string-split %debian-revision #\/)
|
| 431 | ((_ version) version))))
|
| 432 | (sha256
|
| 433 | (base32
|
| 434 | "07ja5wk9p3vcak8czjn70cqg0x7pkwkm2yk9z9fz6925mipnl6yg"))))
|
| 435 |
|
| 436 | (define (origin-file origin file)
|
| 437 | (computed-file
|
| 438 | (basename file)
|
| 439 | #~(symlink (string-append #$origin "/" #$file)
|
| 440 | #$output)))
|
| 441 |
|
| 442 | (define (debian-patch name)
|
| 443 | (origin-file %debian-origin (string-append "/debian/patches/" name)))
|
| 444 |
|
| 445 | (define %debian-patches
|
| 446 | (map debian-patch
|
| 447 | '("bookworm/foreach.patch"
|
| 448 | "debianization/safe-libcxx.patch"
|
| 449 | "disable/enterprise-tests.patch"
|
| 450 | "disable/node-version-ck.patch"
|
| 451 | "disable/rustc-allow-features.patch"
|
| 452 | "fixes/bytemuck.patch"
|
| 453 | "fixes/gentoo-stylesheet.patch"
|
| 454 | "fixes/libcpp-headers.patch"
|
| 455 | "fixes/libpng-testonly.patch"
|
| 456 | "fixes/rust-clanglib.patch"
|
| 457 | "llvm-19/0001-revert-v8-libm.patch"
|
| 458 | "llvm-19/0002-revert-v8-libm.patch"
|
| 459 | "llvm-19/0003-revert-v8-libm.patch"
|
| 460 | "llvm-19/0004-revert-v8-libm.patch"
|
| 461 | "llvm-19/0005-revert-v8-libm.patch"
|
| 462 | "llvm-19/0007-revert-v8-libm.patch"
|
| 463 | "llvm-19/0008-revert-v8-libm.patch"
|
| 464 | "llvm-19/0009-revert-v8-libm.patch"
|
| 465 | "llvm-19/0011-revert-v8-libm.patch"
|
| 466 | "llvm-19/clang19.patch"
|
| 467 | "llvm-19/clone-traits.patch"
|
| 468 | "llvm-19/constexpr.patch"
|
| 469 | "llvm-19/i18n-builder-enum.patch"
|
| 470 | "llvm-19/const-profile.patch"
|
| 471 | "llvm-19/iota.patch"
|
| 472 | "llvm-19/keyfactory.patch"
|
| 473 | "llvm-19/raw-ref-map-find.patch"
|
| 474 | "llvm-19/value-or.patch"
|
| 475 | "llvm-22/ignore-for-ubsan.patch"
|
| 476 | "system/openjpeg.patch"
|
| 477 | "trixie/bindgen-boringssl.patch"
|
| 478 | "trixie/cookie-string-view.patch"
|
| 479 | "trixie/nodejs-main.patch"
|
| 480 | "trixie/revert-v8-sanitize.patch")))
|
| 481 |
|
| 482 | (define %guix-patches
|
| 483 | (map (lambda (patch)
|
| 484 | (local-file
|
| 485 | (assume-valid-file-name
|
| 486 | (search-patch patch))))
|
| 487 | (list
|
| 488 | "ungoogled-chromium-custom-compiler.patch"
|
| 489 | "ungoogled-chromium-empty-parsed-rustc-args.patch"
|
| 490 | "ungoogled-chromium-extension-search-path.patch"
|
| 491 | "ungoogled-chromium-golang.patch"
|
| 492 | "ungoogled-chromium-histograms.patch"
|
| 493 | "ungoogled-chromium-increase-fortify-level.patch"
|
| 494 | "ungoogled-chromium-override-libdrm-assertion.patch"
|
| 495 | "ungoogled-chromium-RUNPATH.patch"
|
| 496 | "ungoogled-chromium-rust-toolchain-var.patch"
|
| 497 | "ungoogled-chromium-system-nspr.patch"
|
| 498 | "ungoogled-chromium-unbundle-minizip.patch")))
|
| 499 |
|
| 500 | (define %patches
|
| 501 | (append %debian-patches
|
| 502 | %guix-patches))
|
| 503 |
|
| 504 | |
| 505 | |
| 506 | |
| 507 | |
| 508 | |
| 509 | (define ungoogled-chromium-snippet
|
| 510 | |
| 511 | (delay
|
| 512 | #~(begin
|
| 513 | (let ((chromium-dir (getcwd)))
|
| 514 | (set-path-environment-variable
|
| 515 | "PATH" '("bin")
|
| 516 | (list #+patch #+python-wrapper #+xz #+zstd))
|
| 517 |
|
| 518 | |
| 519 | |
| 520 | (format #t "Applying assorted build fixes...~%")
|
| 521 | (force-output)
|
| 522 | (for-each (lambda (patch)
|
| 523 | (invoke "patch" "-p1" "--force" "--input"
|
| 524 | patch "--no-backup-if-mismatch"))
|
| 525 | '#+%patches)
|
| 526 |
|
| 527 | (with-directory-excursion #+%ungoogled-origin
|
| 528 | (format #t "Ungooglifying...~%")
|
| 529 | (force-output)
|
| 530 | (invoke "python" "utils/prune_binaries.py" chromium-dir
|
| 531 | "pruning.list")
|
| 532 | (invoke "python" "utils/patches.py" "apply" chromium-dir
|
| 533 | "patches")
|
| 534 | (invoke "python" "utils/domain_substitution.py" "apply" "-r"
|
| 535 | "domain_regex.list" "-f" "domain_substitution.list"
|
| 536 | "-c" "/tmp/domainscache.tar.gz" chromium-dir))
|
| 537 |
|
| 538 | |
| 539 | |
| 540 | (format #t "Removing denied files...~%")
|
| 541 | (force-output)
|
| 542 | (for-each delete-file-recursively '#$%denied-files)
|
| 543 |
|
| 544 | (format #t "Pruning third party files...~%")
|
| 545 | (force-output)
|
| 546 | (apply invoke "python"
|
| 547 | "build/linux/unbundle/remove_bundled_libraries.py"
|
| 548 | "--do-remove" '#$%preserved-third-party-files)
|
| 549 |
|
| 550 | (format #t "Replacing GN files...~%")
|
| 551 | (force-output)
|
| 552 | (substitute* "tools/generate_shim_headers/generate_shim_headers.py"
|
| 553 | |
| 554 | |
| 555 | |
| 556 | |
| 557 | (("#if defined\\(OFFICIAL_BUILD\\)")
|
| 558 | "#if 0"))
|
| 559 |
|
| 560 | |
| 561 | |
| 562 | (invoke "python" "build/linux/unbundle/replace_gn_files.py"
|
| 563 | "--system-libraries"
|
| 564 | |
| 565 | |
| 566 | |
| 567 | |
| 568 | |
| 569 | |
| 570 | |
| 571 | "brotli"
|
| 572 | "crc32c"
|
| 573 | "dav1d"
|
| 574 | |
| 575 | |
| 576 | "flac"
|
| 577 | |
| 578 | "fontconfig"
|
| 579 | "freetype"
|
| 580 | "harfbuzz"
|
| 581 | |
| 582 | |
| 583 | |
| 584 | |
| 585 | "libdrm"
|
| 586 | "libjpeg"
|
| 587 | "libpng"
|
| 588 | |
| 589 | |
| 590 | |
| 591 | "libwebp"
|
| 592 | "libxml"
|
| 593 | |
| 594 | "libxslt"
|
| 595 | |
| 596 | "openh264"
|
| 597 | "opus"
|
| 598 | |
| 599 | |
| 600 | |
| 601 | |
| 602 | |
| 603 | |
| 604 | |
| 605 | "zlib"
|
| 606 | "zstd")))))
|
| 607 |
|
| 608 | (define opus+custom
|
| 609 | (package/inherit opus
|
| 610 | (name "opus+custom")
|
| 611 | (arguments
|
| 612 | (substitute-keyword-arguments arguments
|
| 613 | ((#:configure-flags flags ''())
|
| 614 | |
| 615 | |
| 616 | |
| 617 | `(cons "--enable-custom-modes"
|
| 618 | ,flags))))))
|
| 619 |
|
| 620 | (define-public ungoogled-chromium
|
| 621 | (package
|
| 622 | (name "ungoogled-chromium")
|
| 623 | (version %ungoogled-revision)
|
| 624 | (synopsis "Graphical web browser")
|
| 625 | (source (origin
|
| 626 | (method url-fetch)
|
| 627 | (uri (string-append "https://commondatastorage.googleapis.com"
|
| 628 | "/chromium-browser-official/chromium-"
|
| 629 | %chromium-version "-lite.tar.xz"))
|
| 630 | (sha256
|
| 631 | (base32
|
| 632 | "0ignafc5yhhiknqi6wcw8s4wj1fs70jdcb4bcbv4b4f9q103989z"))
|
| 633 | (modules '((guix build utils)))
|
| 634 | (snippet (force ungoogled-chromium-snippet))))
|
| 635 | (build-system gnu-build-system)
|
| 636 | (arguments
|
| 637 | (list
|
| 638 | #:tests? #f
|
| 639 | #:modules '((guix build gnu-build-system)
|
| 640 | (guix build utils)
|
| 641 | (srfi srfi-26))
|
| 642 | #:configure-flags
|
| 643 | |
| 644 | |
| 645 | |
| 646 | |
| 647 | |
| 648 | #~(list "is_debug=false"
|
| 649 | "is_component_build=false"
|
| 650 | |
| 651 | |
| 652 | "is_official_build=true"
|
| 653 | "clang_use_chrome_plugins=false"
|
| 654 | "use_clang_modules=false"
|
| 655 | |
| 656 | "use_custom_libcxx=false"
|
| 657 | "optimize_webui=false"
|
| 658 | "webnn_use_tflite=false"
|
| 659 | "webnn_use_litert=false"
|
| 660 | "build_tflite_with_xnnpack=false"
|
| 661 | "safe_browsing_use_unrar=false"
|
| 662 | "chrome_pgo_phase=0"
|
| 663 | "use_sysroot=false"
|
| 664 | "goma_dir=\"\""
|
| 665 | "use_unofficial_version_number=false"
|
| 666 | "treat_warnings_as_errors=false"
|
| 667 | "use_official_google_api_keys=false"
|
| 668 | "disable_fieldtrial_testing_config=true"
|
| 669 | "safe_browsing_mode=0"
|
| 670 | "enable_mdns=false"
|
| 671 | "enable_remoting=false"
|
| 672 | "enable_reporting=false"
|
| 673 | "enable_service_discovery=false"
|
| 674 | "enable_vr=false"
|
| 675 | "enable_enterprise_companion=false"
|
| 676 | "enable_iterator_debugging=false"
|
| 677 | "enable_hangout_services_extension=false"
|
| 678 | "enable_widevine=false"
|
| 679 | "fatal_linker_warnings=false"
|
| 680 | |
| 681 | "blink_enable_generated_code_formatting=false"
|
| 682 | |
| 683 | "build_dawn_tests=false"
|
| 684 |
|
| 685 | "angle_has_histograms=false"
|
| 686 | "angle_build_tests=false"
|
| 687 | "build_angle_perftests=false"
|
| 688 | "enable_perfetto_unittests=false"
|
| 689 | "skia_enable_skshapper_tests=false"
|
| 690 | "tint_build_unittests=false"
|
| 691 | "enable_nocompile_tests=false"
|
| 692 | "enable_screen_ai_browsertests=false"
|
| 693 |
|
| 694 | "clang_warning_suppression_file=\"\""
|
| 695 |
|
| 696 | "use_qt5=false"
|
| 697 | "use_qt6=false"
|
| 698 | "is_cfi=false"
|
| 699 |
|
| 700 | "symbol_level=0"
|
| 701 | "blink_symbol_level=0"
|
| 702 | "v8_symbol_level=0"
|
| 703 | "v8_enable_backtrace=false"
|
| 704 | "v8_drumbrake_bounds_checks=true"
|
| 705 |
|
| 706 | |
| 707 | |
| 708 | "custom_toolchain=\"//build/toolchain/linux/unbundle:default\""
|
| 709 | "host_toolchain=\"//build/toolchain/linux/unbundle:default\""
|
| 710 |
|
| 711 | (string-append "clang_base_path=\""
|
| 712 | (dirname (dirname (search-input-file %build-inputs
|
| 713 | "/bin/clang")))
|
| 714 | "\"")
|
| 715 |
|
| 716 | (string-append "clang_version="
|
| 717 | #$(version-major (package-version clang)))
|
| 718 |
|
| 719 | (string-append "rust_sysroot_absolute=\""
|
| 720 | (dirname (dirname (search-input-file %build-inputs
|
| 721 | "/bin/rustc")))
|
| 722 | "\"")
|
| 723 | (string-append "rust_bindgen_root=\""
|
| 724 | (dirname (dirname (search-input-file %build-inputs
|
| 725 | "/bin/bindgen")))
|
| 726 | "\"")
|
| 727 |
|
| 728 | (string-append "rustc_version=\"rustc "
|
| 729 | #$(package-version rust)
|
| 730 | |
| 731 | |
| 732 | |
| 733 | " (f6e511eec 2024-10-15) (built from a source tarball)\"")
|
| 734 |
|
| 735 | |
| 736 | "use_system_freetype=true"
|
| 737 | "use_system_harfbuzz=true"
|
| 738 | "use_system_icu=false"
|
| 739 | "use_system_lcms2=true"
|
| 740 | "use_system_libdrm=true"
|
| 741 | "use_system_libffi=true"
|
| 742 | "use_system_libjpeg=true"
|
| 743 | "use_system_libopenjpeg2=true"
|
| 744 | "use_system_libpng=true"
|
| 745 |
|
| 746 | "use_system_zlib=true"
|
| 747 | "use_gnome_keyring=false" |
| 748 | "use_pulseaudio=true"
|
| 749 | "link_pulseaudio=true"
|
| 750 | "icu_use_data_file=true"
|
| 751 |
|
| 752 | |
| 753 | #$@(if (string-prefix? "x86_64" (or (%current-target-system)
|
| 754 | (%current-system)))
|
| 755 | '("use_vaapi=true")
|
| 756 | '())
|
| 757 |
|
| 758 | #$@(if (string-prefix? "aarch64" (or (%current-target-system)
|
| 759 | (%current-system)))
|
| 760 | '("use_v4l2_codec=true"
|
| 761 | "use_vaapi=false"
|
| 762 | "use_av1_hw_decoder=true")
|
| 763 | '())
|
| 764 |
|
| 765 | |
| 766 | "proprietary_codecs=true"
|
| 767 | "ffmpeg_branding=\"Chrome\""
|
| 768 |
|
| 769 | "rtc_use_pipewire=true")
|
| 770 | #:phases
|
| 771 | #~(modify-phases %standard-phases
|
| 772 | (add-after 'unpack 'patch-stuff
|
| 773 | (lambda* (#:key inputs native-inputs #:allow-other-keys)
|
| 774 | (let* ((brotli (search-input-file inputs
|
| 775 | "/bin/brotli"))
|
| 776 | (libopenjp2 (search-input-file inputs "lib/libopenjp2.so"))
|
| 777 | (openjpeg (dirname (dirname libopenjp2)))
|
| 778 | (gperf (search-input-file (or native-inputs inputs)
|
| 779 | "/bin/gperf"))
|
| 780 | (compiler-rt-path (dirname
|
| 781 | (dirname
|
| 782 | (search-input-file (or native-inputs inputs)
|
| 783 | "/bin/hwasan_symbolize")))))
|
| 784 | (substitute* "third_party/brotli/BUILD.gn"
|
| 785 | (("/usr/bin/brotli")
|
| 786 | brotli))
|
| 787 |
|
| 788 | |
| 789 | (substitute* "build/config/clang/BUILD.gn"
|
| 790 | (("\\$clang_base_path/lib/clang/\\$clang_version")
|
| 791 | compiler-rt-path))
|
| 792 |
|
| 793 | (substitute* "third_party/pdfium/BUILD.gn"
|
| 794 | |
| 795 | (("/usr/include/openjpeg-")
|
| 796 | (string-append openjpeg "/include/openjpeg-")))
|
| 797 |
|
| 798 | (substitute*
|
| 799 | (append
|
| 800 | '("media/audio/audio_opus_encoder.h")
|
| 801 | (find-files (string-append "third_party/webrtc/modules"
|
| 802 | "/audio_coding/codecs/opus")))
|
| 803 | |
| 804 | |
| 805 | (("#include \"opus\\.h\"")
|
| 806 | "#include \"opus/opus.h\"")
|
| 807 | (("#include \"opus_custom\\.h\"")
|
| 808 | "#include \"opus/opus_custom.h\"")
|
| 809 | (("#include \"opus_defines\\.h\"")
|
| 810 | "#include \"opus/opus_defines.h\"")
|
| 811 | (("#include \"opus_multistream\\.h\"")
|
| 812 | "#include \"opus/opus_multistream.h\"")
|
| 813 | (("#include \"opus_types\\.h\"")
|
| 814 | "#include \"opus/opus_types.h\"")
|
| 815 | (("\"third_party/opus/src/include/([a-z_-]+\\.h)\"" _ header)
|
| 816 | (string-append "<opus/" header ">")))
|
| 817 |
|
| 818 | |
| 819 | |
| 820 | |
| 821 | |
| 822 | |
| 823 |
|
| 824 | |
| 825 | (substitute* "third_party/pdfium/core/fxcodec/icc/icc_transform.h"
|
| 826 | (("include \"third_party/lcms/include/lcms2\\.h\"")
|
| 827 | "include \"lcms2.h\""))
|
| 828 |
|
| 829 | |
| 830 | |
| 831 | |
| 832 | (delete-file-recursively "third_party/pyyaml")
|
| 833 |
|
| 834 | |
| 835 | |
| 836 | (mkdir-p "third_party/gperf/cipd")
|
| 837 | (symlink (dirname gperf) "third_party/gperf/cipd/bin")
|
| 838 |
|
| 839 | (substitute*
|
| 840 | "third_party/breakpad/breakpad/src/common/linux/libcurl_wrapper.h"
|
| 841 | (("include \"third_party/curl")
|
| 842 | "include \"curl"))
|
| 843 |
|
| 844 | |
| 845 | (substitute* '("build/rust/rust_bindgen_generator.gni"
|
| 846 | "build/rust/rust_bindgen.gni")
|
| 847 | (("(_libclang_path = )rust_bindgen_root" _ libclang)
|
| 848 | (string-append libclang "clang_base_path"))
|
| 849 | (("(_rustfmt_path = \")\\$\\{rust_bindgen_root\\}" _ rustfmt)
|
| 850 | (string-append rustfmt "${rust_sysroot_absolute}"))))))
|
| 851 | (add-after 'patch-stuff 'add-absolute-references
|
| 852 | (lambda* (#:key inputs #:allow-other-keys)
|
| 853 | (let ((cups-config (search-input-file inputs "/bin/cups-config"))
|
| 854 | (libnssckbi.so (search-input-file inputs
|
| 855 | "/lib/nss/libnssckbi.so"))
|
| 856 | (gtk-libs '("libgio-2.0.so.0"
|
| 857 | "libgdk_pixbuf-2.0.so.0"
|
| 858 | "libgdk-3.so.0"
|
| 859 | "libgtk-3.so.0")))
|
| 860 | (for-each (lambda (lib)
|
| 861 | (substitute* "ui/gtk/gtk_compat.cc"
|
| 862 | ((lib) (search-input-file
|
| 863 | inputs (string-append "lib/" lib)))))
|
| 864 | gtk-libs)
|
| 865 | (substitute* "printing/cups_config_helper.py"
|
| 866 | (("cups_config =.*")
|
| 867 | (string-append "cups_config = '" cups-config "'\n")))
|
| 868 | (substitute* "crypto/nss_util.cc"
|
| 869 | (("libnssckbi\\.so") libnssckbi.so)))))
|
| 870 | (add-after 'add-absolute-references 'adjust-CPLUS_INCLUDE_PATH
|
| 871 | |
| 872 | |
| 873 | |
| 874 | |
| 875 | |
| 876 | (lambda* (#:key native-inputs inputs #:allow-other-keys)
|
| 877 | (let* ((libcxx-v1 (search-input-directory inputs
|
| 878 | "include/c++/v1"))
|
| 879 | (target-system #$(nix-system->gnu-triplet
|
| 880 | (or (%current-target-system)
|
| 881 | (%current-system))))
|
| 882 | (target-include (string-append "include/c++/"
|
| 883 | target-system))
|
| 884 | (gcc-bits (search-input-directory inputs
|
| 885 | target-include)))
|
| 886 | (setenv "CPLUS_INCLUDE_PATH"
|
| 887 | (string-append libcxx-v1 ":" gcc-bits ":"
|
| 888 | (getenv "CPLUS_INCLUDE_PATH"))))))
|
| 889 | (add-before 'configure 'prepare-build-environment
|
| 890 | (lambda* (#:key native-inputs inputs #:allow-other-keys)
|
| 891 | (let ((node (search-input-file (or native-inputs inputs)
|
| 892 | "/bin/node")))
|
| 893 | |
| 894 | (setenv "AR" "llvm-ar") (setenv "NM" "llvm-nm")
|
| 895 | (setenv "CC" "clang") (setenv "CXX" "clang++")
|
| 896 |
|
| 897 | (setenv "CXXFLAGS"
|
| 898 | (string-append " -Wno-conversion"
|
| 899 | " -Wno-unused-function"
|
| 900 | " -Wno-unused-variable"
|
| 901 | " -Wno-unused-private-field"
|
| 902 | " -Wno-deprecated-declarations"
|
| 903 | " -Wno-unknown-pragmas"
|
| 904 | " -fno-delete-null-pointer-checks"
|
| 905 | " -stdlib=libc++"))
|
| 906 | (setenv "LDFLAGS"
|
| 907 | (string-append " -stdlib=libc++"
|
| 908 | " -Wl,--stats"))
|
| 909 | (setenv "CLANG_MVERS" #$(version-major
|
| 910 | (package-version clang)))
|
| 911 | (setenv "RUSTC_BOOTSTRAP" "1")
|
| 912 |
|
| 913 | |
| 914 | (setenv "PYTHONDONTWRITEBYTECODE" "1")
|
| 915 |
|
| 916 | |
| 917 | (setenv "HOME" "/tmp")
|
| 918 | |
| 919 | (setenv "GOPROXY" "off")
|
| 920 |
|
| 921 | |
| 922 | (mkdir-p "third_party/node/linux/node-linux-x64")
|
| 923 | (symlink (dirname node)
|
| 924 | "third_party/node/linux/node-linux-x64/bin"))))
|
| 925 | (replace 'configure
|
| 926 | (lambda* (#:key configure-flags #:allow-other-keys)
|
| 927 | (let ((args (string-join configure-flags " ")))
|
| 928 | |
| 929 | (invoke "gn" "gen" "out/Release"
|
| 930 | (string-append "--args=" args))
|
| 931 |
|
| 932 | |
| 933 | |
| 934 | (format #t "Dumping configure flags...\n")
|
| 935 | (invoke "gn" "args" "out/Release" "--list"))))
|
| 936 | (add-before 'build 'increase-resource-limits
|
| 937 | (lambda _
|
| 938 | |
| 939 | |
| 940 | |
| 941 |
|
| 942 | |
| 943 | |
| 944 | (call-with-values (lambda () (getrlimit 'nofile))
|
| 945 | (lambda (soft hard)
|
| 946 | (when (and soft (< soft 2048))
|
| 947 | (if hard
|
| 948 | (setrlimit 'nofile (min hard 2048) hard)
|
| 949 | (setrlimit 'nofile 2048 #f))
|
| 950 | (format #t
|
| 951 | "increased maximum number of open files from ~d to ~d~%"
|
| 952 | soft (if hard (min hard 2048) 2048)))))))
|
| 953 | (replace 'build
|
| 954 | (lambda* (#:key (parallel-build? #t) #:allow-other-keys)
|
| 955 | (invoke "ninja" "-C" "out/Release"
|
| 956 | "-j" (if parallel-build?
|
| 957 | (number->string (parallel-job-count))
|
| 958 | "1")
|
| 959 | "chrome"
|
| 960 | "chromedriver")))
|
| 961 | (replace 'install
|
| 962 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 963 | (let* ((out (assoc-ref outputs "out"))
|
| 964 | (bin (string-append out "/bin"))
|
| 965 | (exe (string-append bin "/chromium"))
|
| 966 | (lib (string-append out "/lib"))
|
| 967 | (man (string-append out "/share/man/man1"))
|
| 968 | (applications (string-append out "/share/applications"))
|
| 969 | (libs '("chrome_100_percent.pak"
|
| 970 | "chrome_200_percent.pak"
|
| 971 | "resources.pak"
|
| 972 | "v8_context_snapshot.bin"
|
| 973 | "chrome_crashpad_handler"
|
| 974 | "icudtl.dat"
|
| 975 |
|
| 976 | |
| 977 | "libvk_swiftshader.so"
|
| 978 | "vk_swiftshader_icd.json"
|
| 979 |
|
| 980 | |
| 981 | |
| 982 | "libvulkan.so.1"
|
| 983 | "libEGL.so" "libGLESv2.so"))
|
| 984 | (locales (string-append lib "/locales"))
|
| 985 | (resources (string-append lib "/resources"))
|
| 986 | (preferences
|
| 987 | |
| 988 | #$(local-file
|
| 989 | (search-auxiliary-file
|
| 990 | "chromium/master-preferences.json")))
|
| 991 | (gtk (dirname (dirname
|
| 992 | (search-input-file inputs "lib/libgtk-3.so"))))
|
| 993 | (mesa (dirname (search-input-file inputs "lib/libGL.so")))
|
| 994 | (xdg-utils (dirname (search-input-file inputs "bin/xdg-open"))))
|
| 995 |
|
| 996 | (substitute* '("chrome/app/resources/manpage.1.in"
|
| 997 | "chrome/installer/linux/common/desktop.template")
|
| 998 | (("@@MENUNAME") "Chromium")
|
| 999 | (("@@PACKAGE") "chromium")
|
| 1000 | (("/usr/bin/@@usr_bin_symlink_name") exe)
|
| 1001 | (("@@uri_scheme") "x-scheme-handler/chromium;")
|
| 1002 | (("@@extra_desktop_entries") "")
|
| 1003 | (("@@startup_wm_class") "Chromium-browser"))
|
| 1004 |
|
| 1005 | (mkdir-p man)
|
| 1006 | (copy-file "chrome/app/resources/manpage.1.in"
|
| 1007 | (string-append man "/chromium.1"))
|
| 1008 |
|
| 1009 | (mkdir-p applications)
|
| 1010 | (copy-file "chrome/installer/linux/common/desktop.template"
|
| 1011 | (string-append applications "/chromium.desktop"))
|
| 1012 |
|
| 1013 | (mkdir-p lib)
|
| 1014 | (copy-file preferences (string-append lib "/master_preferences"))
|
| 1015 |
|
| 1016 | (with-directory-excursion "out/Release"
|
| 1017 | (for-each (cut install-file <> lib) libs)
|
| 1018 | (copy-file "chrome" (string-append lib "/chromium"))
|
| 1019 |
|
| 1020 | (copy-recursively "locales" locales)
|
| 1021 | (copy-recursively "resources" resources)
|
| 1022 |
|
| 1023 | (mkdir-p bin)
|
| 1024 | (symlink "../lib/chromium" exe)
|
| 1025 | (install-file "chromedriver" bin)
|
| 1026 |
|
| 1027 | (wrap-program exe
|
| 1028 | |
| 1029 | `("XDG_DATA_DIRS" ":" prefix (,(string-append gtk "/share")))
|
| 1030 | |
| 1031 | |
| 1032 | `("LD_LIBRARY_PATH" ":" prefix
|
| 1033 | (,mesa))
|
| 1034 | |
| 1035 | `("PATH" ":" prefix (,xdg-utils))))
|
| 1036 |
|
| 1037 | (with-directory-excursion "chrome/app/theme/chromium"
|
| 1038 | (for-each
|
| 1039 | (lambda (size)
|
| 1040 | (let ((icons (string-append out "/share/icons/hicolor/"
|
| 1041 | size "x" size "/apps")))
|
| 1042 | (mkdir-p icons)
|
| 1043 | (copy-file (string-append "product_logo_" size ".png")
|
| 1044 | (string-append icons "/chromium.png"))))
|
| 1045 | '("24" "48" "64" "128" "256")))))))))
|
| 1046 | (native-inputs
|
| 1047 | (list bison
|
| 1048 | clang
|
| 1049 | clang-runtime
|
| 1050 | clang-toolchain
|
| 1051 | gn
|
| 1052 | gperf
|
| 1053 | go
|
| 1054 | lld-as-ld-wrapper
|
| 1055 | llvm
|
| 1056 | ninja
|
| 1057 | node-lts
|
| 1058 | pkg-config
|
| 1059 | which
|
| 1060 | python-beautifulsoup4
|
| 1061 | python-html5lib
|
| 1062 | python-pyyaml
|
| 1063 | python-wrapper
|
| 1064 | rust
|
| 1065 | rust-bindgen-cli
|
| 1066 | rust-cbindgen
|
| 1067 | wayland))
|
| 1068 | (inputs
|
| 1069 | (list alsa-lib
|
| 1070 | at-spi2-core
|
| 1071 | bash-minimal
|
| 1072 | brotli
|
| 1073 | crc32c
|
| 1074 | cups
|
| 1075 | curl
|
| 1076 | dav1d
|
| 1077 | dbus
|
| 1078 | expat
|
| 1079 | flac
|
| 1080 | fontconfig
|
| 1081 | fp16
|
| 1082 | freetype
|
| 1083 | fxdiv
|
| 1084 | gdk-pixbuf
|
| 1085 | glib
|
| 1086 | gtk+
|
| 1087 | harfbuzz
|
| 1088 | icu4c-77
|
| 1089 | lcms
|
| 1090 | libcxx
|
| 1091 | libdrm
|
| 1092 | libffi
|
| 1093 | libjpeg-turbo
|
| 1094 | libpng
|
| 1095 | libva
|
| 1096 | libvpx
|
| 1097 | libwebp
|
| 1098 | libx11
|
| 1099 | libxcb
|
| 1100 | libxcomposite
|
| 1101 | libxcursor
|
| 1102 | libxdamage
|
| 1103 | libxext
|
| 1104 | libxfixes
|
| 1105 | libxi
|
| 1106 | libxml2
|
| 1107 | libxrandr
|
| 1108 | libxrender
|
| 1109 | libxscrnsaver
|
| 1110 | libxslt
|
| 1111 | libxtst
|
| 1112 | mesa
|
| 1113 | minizip
|
| 1114 | mit-krb5
|
| 1115 | nss
|
| 1116 | openh264
|
| 1117 | openjpeg |
| 1118 | opus+custom
|
| 1119 | pango
|
| 1120 | pciutils
|
| 1121 | pipewire
|
| 1122 | pulseaudio
|
| 1123 | qtbase
|
| 1124 | snappy
|
| 1125 | speech-dispatcher
|
| 1126 | eudev
|
| 1127 | valgrind/pinned
|
| 1128 | wayland
|
| 1129 | xdg-utils
|
| 1130 | `(,zstd "lib")))
|
| 1131 | (native-search-paths
|
| 1132 | (list (search-path-specification
|
| 1133 | (variable "CHROMIUM_EXTENSION_DIRECTORY")
|
| 1134 | (separator #f) |
| 1135 | (files '("share/chromium/extensions")))))
|
| 1136 |
|
| 1137 | |
| 1138 | |
| 1139 | (properties '((timeout . 144000) |
| 1140 | |
| 1141 | (max-silent-time . 7200)
|
| 1142 | (cpe-name . "chrome")))
|
| 1143 |
|
| 1144 | (home-page "https://ungoogled-software.github.io/")
|
| 1145 | (description
|
| 1146 | "Ungoogled-Chromium is the Chromium web browser, with some functionality
|
| 1147 | disabled in order to protect the users privacy. This package also includes
|
| 1148 | the @command{chromedriver} command, which can be useful for automated web
|
| 1149 | testing.")
|
| 1150 | |
| 1151 | |
| 1152 | (license (list license:bsd-3
|
| 1153 | license:bsd-2
|
| 1154 | license:expat
|
| 1155 | license:asl2.0
|
| 1156 | license:mpl1.1
|
| 1157 | license:mpl2.0
|
| 1158 | license:public-domain
|
| 1159 | license:isc
|
| 1160 | (license:non-copyleft "chrome://credits"
|
| 1161 | "See chrome://credits for more information.")
|
| 1162 | license:lgpl2.1+))))
|
| 1163 |
|
| 1164 | (define-public ungoogled-chromium/wayland
|
| 1165 | (package
|
| 1166 | (inherit ungoogled-chromium)
|
| 1167 | (name "ungoogled-chromium-wayland")
|
| 1168 | (native-inputs '())
|
| 1169 | (inputs
|
| 1170 | (list bash-minimal (libc-utf8-locales-for-target) ungoogled-chromium))
|
| 1171 | (build-system trivial-build-system)
|
| 1172 | (arguments
|
| 1173 | (list
|
| 1174 | #:modules '((guix build utils))
|
| 1175 | #:builder
|
| 1176 | #~(begin
|
| 1177 | (use-modules (guix build utils))
|
| 1178 | (let* ((bash #$(this-package-input "bash-minimal"))
|
| 1179 | (chromium #$(this-package-input "ungoogled-chromium"))
|
| 1180 | (locales #$(this-package-input "glibc-utf8-locales"))
|
| 1181 | (exe (string-append #$output "/bin/chromium")))
|
| 1182 |
|
| 1183 | |
| 1184 | (setenv "GUIX_LOCPATH" (string-append locales "/lib/locale"))
|
| 1185 | (setlocale LC_ALL "en_US.utf8")
|
| 1186 |
|
| 1187 | (mkdir-p (dirname exe))
|
| 1188 | (symlink (string-append chromium "/bin/chromedriver")
|
| 1189 | (string-append #$output "/bin/chromedriver"))
|
| 1190 |
|
| 1191 | (call-with-output-file exe
|
| 1192 | (lambda (port)
|
| 1193 | (format port "#!~a
|
| 1194 | exec ~a --enable-features=UseOzonePlatform --ozone-platform=wayland \
|
| 1195 | --enable-features=WebRTCPipeWireCapturer $@"
|
| 1196 | (string-append bash "/bin/bash")
|
| 1197 | (string-append chromium "/bin/chromium"))))
|
| 1198 | (chmod exe #o555)
|
| 1199 |
|
| 1200 | |
| 1201 | (copy-recursively (string-append chromium "/share")
|
| 1202 | (string-append #$output "/share"))
|
| 1203 | (substitute* (string-append
|
| 1204 | #$output "/share/applications/chromium.desktop")
|
| 1205 | ((chromium) #$output))))))))
|