Merge pull request #158270 from samuelgrf/ungoogled-chromium-fix-build
ungoogled-chromium: inherit upstream's build flags
This commit is contained in:
commit
97b9a89d8f
@ -287,24 +287,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:
|
||||
|
Loading…
Reference in New Issue
Block a user