mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-21 16:11:22 +00:00
Merge pull request #166305 from primeos/chromium-backport
[21.11] Prepare for backporting Chromium M100
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
, libusb1, re2
|
||||
, ffmpeg, libxslt, libxml2
|
||||
, nasm
|
||||
, nspr, nss, systemd
|
||||
, nspr, nss
|
||||
, util-linux, alsa-lib
|
||||
, bison, gperf, libkrb5
|
||||
, glib, gtk3, dbus-glib
|
||||
@@ -47,6 +47,8 @@
|
||||
, ungoogled ? false, ungoogled-chromium
|
||||
# Optional dependencies:
|
||||
, libgcrypt ? null # gnomeSupport || cupsSupport
|
||||
, systemdSupport ? stdenv.isLinux
|
||||
, systemd
|
||||
}:
|
||||
|
||||
buildFun:
|
||||
@@ -139,7 +141,7 @@ let
|
||||
libusb1 re2
|
||||
ffmpeg libxslt libxml2
|
||||
nasm
|
||||
nspr nss systemd
|
||||
nspr nss
|
||||
util-linux alsa-lib
|
||||
bison gperf libkrb5
|
||||
glib gtk3 dbus-glib
|
||||
@@ -151,7 +153,8 @@ let
|
||||
libdrm wayland mesa.drivers libxkbcommon
|
||||
curl
|
||||
libepoxy
|
||||
] ++ optionals gnomeSupport [ gnome2.GConf libgcrypt ]
|
||||
] ++ optional systemdSupport systemd
|
||||
++ optionals gnomeSupport [ gnome2.GConf libgcrypt ]
|
||||
++ optional gnomeKeyringSupport libgnome-keyring3
|
||||
++ optionals cupsSupport [ libgcrypt cups ]
|
||||
++ optional pulseSupport libpulseaudio;
|
||||
@@ -204,9 +207,10 @@ let
|
||||
sed -i -e 's@"\(#!\)\?.*xdg-@"\1${xdg-utils}/bin/xdg-@' \
|
||||
chrome/browser/shell_integration_linux.cc
|
||||
|
||||
'' + lib.optionalString systemdSupport ''
|
||||
sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${lib.getLib systemd}/lib/\1!' \
|
||||
device/udev_linux/udev?_loader.cc
|
||||
|
||||
'' + ''
|
||||
sed -i -e '/libpci_loader.*Load/s!"\(libpci\.so\)!"${pciutils}/lib/\1!' \
|
||||
gpu/config/gpu_info_collector_linux.cc
|
||||
|
||||
@@ -287,24 +291,8 @@ let
|
||||
} // optionalAttrs pulseSupport {
|
||||
use_pulseaudio = true;
|
||||
link_pulseaudio = true;
|
||||
} // optionalAttrs ungoogled {
|
||||
chrome_pgo_phase = 0;
|
||||
enable_hangout_services_extension = false;
|
||||
enable_js_type_check = false;
|
||||
enable_mdns = false;
|
||||
enable_one_click_signin = false;
|
||||
enable_reading_list = false;
|
||||
enable_remoting = false;
|
||||
enable_reporting = false;
|
||||
enable_service_discovery = false;
|
||||
exclude_unwind_tables = true;
|
||||
google_api_key = "";
|
||||
google_default_client_id = "";
|
||||
google_default_client_secret = "";
|
||||
safe_browsing_mode = 0;
|
||||
use_official_google_api_keys = false;
|
||||
use_unofficial_version_number = false;
|
||||
} // (extraAttrs.gnFlags or {}));
|
||||
} // optionalAttrs ungoogled (importTOML ./ungoogled-flags.toml)
|
||||
// (extraAttrs.gnFlags or {}));
|
||||
|
||||
configurePhase = ''
|
||||
runHook preConfigure
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
build_with_tflite_lib=false
|
||||
chrome_pgo_phase=0
|
||||
clang_use_chrome_plugins=false
|
||||
disable_fieldtrial_testing_config=true
|
||||
enable_hangout_services_extension=false
|
||||
enable_js_type_check=false
|
||||
enable_mdns=false
|
||||
enable_mse_mpeg2ts_stream_parser=true
|
||||
enable_nacl=false
|
||||
enable_one_click_signin=false
|
||||
enable_reading_list=false
|
||||
enable_remoting=false
|
||||
enable_reporting=false
|
||||
enable_service_discovery=false
|
||||
enable_widevine=true
|
||||
exclude_unwind_tables=true
|
||||
google_api_key=""
|
||||
google_default_client_id=""
|
||||
google_default_client_secret=""
|
||||
safe_browsing_mode=0
|
||||
treat_warnings_as_errors=false
|
||||
use_official_google_api_keys=false
|
||||
use_unofficial_version_number=false
|
||||
@@ -24,6 +24,7 @@ DEB_URL = 'https://dl.google.com/linux/chrome/deb/pool/main/g'
|
||||
BUCKET_URL = 'https://commondatastorage.googleapis.com/chromium-browser-official'
|
||||
|
||||
JSON_PATH = dirname(abspath(__file__)) + '/upstream-info.json'
|
||||
UNGOOGLED_FLAGS_PATH = dirname(abspath(__file__)) + '/ungoogled-flags.toml'
|
||||
COMMIT_MESSAGE_SCRIPT = dirname(abspath(__file__)) + '/get-commit-message.py'
|
||||
|
||||
|
||||
@@ -108,6 +109,12 @@ def get_latest_ungoogled_chromium_build():
|
||||
}
|
||||
|
||||
|
||||
def get_ungoogled_chromium_gn_flags(revision):
|
||||
"""Returns ungoogled-chromium's GN build flags for the given revision."""
|
||||
gn_flags_url = f'https://raw.githubusercontent.com/Eloston/ungoogled-chromium/{revision}/flags.gn'
|
||||
return urlopen(gn_flags_url).read().decode()
|
||||
|
||||
|
||||
def channel_name_to_attr_name(channel_name):
|
||||
"""Maps a channel name to the corresponding main Nixpkgs attribute name."""
|
||||
if channel_name == 'stable':
|
||||
@@ -208,6 +215,8 @@ with urlopen(HISTORY_URL) as resp:
|
||||
'rev': build['ungoogled_tag'],
|
||||
'sha256': nix_prefetch_git(ungoogled_repo_url, build['ungoogled_tag'])['sha256']
|
||||
}
|
||||
with open(UNGOOGLED_FLAGS_PATH, 'w') as out:
|
||||
out.write(get_ungoogled_chromium_gn_flags(build['ungoogled_tag']))
|
||||
|
||||
channels[channel_name] = channel
|
||||
|
||||
@@ -227,6 +236,8 @@ if len(sys.argv) == 2 and sys.argv[1] == '--commit':
|
||||
if channel_name == 'stable':
|
||||
body = subprocess.check_output([COMMIT_MESSAGE_SCRIPT, version_new]).decode('utf-8')
|
||||
commit_message += '\n\n' + body
|
||||
elif channel_name == 'ungoogled-chromium':
|
||||
subprocess.run(['git', 'add', UNGOOGLED_FLAGS_PATH], check=True)
|
||||
subprocess.run(['git', 'add', JSON_PATH], check=True)
|
||||
subprocess.run(['git', 'commit', '--file=-'], input=commit_message.encode(), check=True)
|
||||
else:
|
||||
|
||||
@@ -19,22 +19,9 @@
|
||||
}
|
||||
},
|
||||
"beta": {
|
||||
"version": "99.0.4844.51",
|
||||
"sha256": "1qxsn8zvvvsnn0k7nn606rhaial8ikrlfh175msqpp50xibjxicp",
|
||||
"sha256bin64": "1bayx03xf94ra0wid1jn10vysa6src4hmrdzdxf566rx9wcg29pk",
|
||||
"deps": {
|
||||
"gn": {
|
||||
"version": "2022-01-10",
|
||||
"url": "https://gn.googlesource.com/gn",
|
||||
"rev": "80a40b07305373617eba2d5878d353532af77da3",
|
||||
"sha256": "1103lf38h7412949j6nrk48m2vv2rrxacn42sjg33lg88nyv7skv"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dev": {
|
||||
"version": "100.0.4896.12",
|
||||
"sha256": "07jd3d5jhs659wwxnbxk6h93pz8zaynrw72b0y9l6l824lip6hl2",
|
||||
"sha256bin64": "0fnxq0vjn00zai94p8jgx69bag30zzlfl2vzn0zb65pr10fpac87",
|
||||
"version": "100.0.4896.56",
|
||||
"sha256": "0vdyddxhmkw9bqwx5j19h69swx9ysiipsmcc1sjl0qv8bn8f790z",
|
||||
"sha256bin64": "09h4fxsx0q5b0gn258xnmk11qz7ql8flpn4mq5x201abmv29y856",
|
||||
"deps": {
|
||||
"gn": {
|
||||
"version": "2022-01-21",
|
||||
@@ -44,6 +31,19 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"dev": {
|
||||
"version": "101.0.4951.7",
|
||||
"sha256": "0xnvbiqi50hgky35qaivcyzfp05nnwfwqrd50dksqkzycl8avb4z",
|
||||
"sha256bin64": "19my3zr9d3w2ypl9cm1xa15vhyv9add1f283alb9fmh2qwhl4scg",
|
||||
"deps": {
|
||||
"gn": {
|
||||
"version": "2022-03-14",
|
||||
"url": "https://gn.googlesource.com/gn",
|
||||
"rev": "bd99dbf98cbdefe18a4128189665c5761263bcfb",
|
||||
"sha256": "0nql15ckjqkm001xajq3qyn4h4q80i7x6dm9zinxxr1a8q5lppx3"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ungoogled-chromium": {
|
||||
"version": "99.0.4844.84",
|
||||
"sha256": "05bma8lsm5lad58mlfiv8bg0fw5k5mxh0v6g1ik7xp2bsd71iv10",
|
||||
|
||||
Reference in New Issue
Block a user